Fixed the search functionality