Changes to update preferences directly when the PreferenceManager.update function doesn't work.