fix units sorting