fixed issue when unmapping polygons

fixes #522