Fixed sorting of results.