fixed search functionality