Fix a bug that search doesn't work