Updating Search Provider

Fixing some edge cases.