more fixes to distance_dependency.py