Fix for difference between MySql and sqlite.