fix prefs change handling