Now closes on main window close