NEXUS-5790: Sorting order fixed