fix calc distance in average clustering
Merge branch 'fix-average'