small changes to make the search page not crash.