Make ESC work on dialogs