Fixed sorting inconsistency.