solve searching bug