Fixed a but with Prefs