Fixed sorting criteria.