Removed redundant min_dist definition