#36 failsafe for close button in dialog