MySQLi fixes