Fixes for mysql.php