References are sorted properly