only remove the last vertex of closed polygons with more than one point