Added endPath, endText. fixes extra <g> elements