fixed bugs for semivariogram