fixed a bug when search error is occuring