fixing geom simplification returning invalid geometries