Fix prefs window crasher