Implemented handler for PreferencesChanged event