Fixed segfault when exporting to SVG