enumeration sort fix