close and destroy dialog on ESC