fixing mainwindow