Make sure results are sorted