fixed esc and enter