DefaultDistance implementation fix