Updates preferences.