Fixes in accum_dist methods
Merge pull request #186 from Adil-Ibragimov/distance_fix

Fixes in accum_dist methods