Remove global variable for main window