Small changes to the search function.