main window fix