add closing tag for path and polygon