Fixed distance calculation!!!