Changed minDistance