Fix mainwindows