Polygon fix

This attempts to resolve #2.