bugfix polygon handling