fix mysql issues