fix for the search bug