Fix get distance