fix a search bug