fix the search bug