bug fix for search error