allow closing of window