fixed issues with MySQL