Improved search esc behaviour