Fixes svg drawing functionality

Ref #78 

cc @javisantana 
is this a global variable? I'd also move this outside if