fixes #239: properly close interior polygons