Update the preferences.