Fix error in return statement of the search method