fixing the search problem