Fix up distance calc section