Minor changes concerning the distance computation.