Fix SQL error after update 1.8 > 2.0