Corrected mean_min_dists to calculate sigmas