fixed possible null pointer call
fixed getSvgRoot