Log window was preventing the main window from closing