Fix for `Commands out of sync; you can't run this command now` MySQLi error