Major error fixed in distancePolygonToPoint