fixing search-by-enter bug