attempt to deal with invalid polygons