Corrected window state when hidden.