fixed so that a single search result goes straight to the result page

And tests.