Search fixes

- Fixed #2928
- Misc fixes

review: @devoncarew

Ditto