Update preferences.