Better handling of polygons