fixed a bug that caused polygons not to actually be deleted when they should be