bug fix in wasserstein distance