sortMoved()

Fixed sorting algorithm.