add escape event to close