fixed a bug regarding the search feature.