Fixed some possible NullRefExceptions in MainWindow