Mainwindow fix