Fix a bug of search