Adding handler to close on esc