Fix a bug in mean_min_dists, tmp[i] is indented.