fix prefs window only showing up once