fix closepolygon