fix sorting
Merge branch 'fix-sorting' into 2-6-stable