fixes polygon triangulation