fix mysql and sqlite