fix distances