Fixed pref bug