Error after upgrading from 2.7 to 3.1 latest