Fix Eigen computation of distances.