Fixed typo which could cause crash in main window