Fixed a search bug, and added better error handling to the search view.