Fixed search so its less fragile
Merge pull request #219 from balanced/fix-search

Fixed search so its less fragile