fix previous distance