Fixed prefs bug