Gridding Distances 2

* Fixed the weighted distances of cells