Bug fix for search