bug fix for search