fix comparison bug for dists