Fixed errors with search.