fix mainwindow