added close on press ESC