Fixed SVG export and added regression test