Bug fix for distance calculation

There is a small copy-paste error that reduces the distance of each calculation.
For my data, the bug reduced my total distance traveled by over half!