Fix introduced sort bug.