fixing bug in the MySQL command