fix the distance estimation in messages