Preferences are now saved correctly