MainWindow just closes