fixed esc behavior