fix: compiling issue about a read-only method of Polygon