fixes to close polygons