fix bug in computing distance (was returning negative numbers); arrow lengths are consistent now