Fixed toSVG for line, changes in rendering logic