fixed preferences.php bug