Fixed setPreference