fix the behavior of the search bar