Fix on distance logging