Added hiding of a dialog box when pressing ESC
Added hiding of a dialog box when pressing ESC