Fixed MainWindow startup.