fixed the search function for the entities