fixed a search bug