Fix exception for some searches