debugging close with esc and click