Fix unresponsive main window after hide