fixed overdlow when calculating winding of large polygons in the