Fixed errors with search