fixed a silly bug of search