fixed a element selection issue, to make it work in both Chrome and
Safari. In Safari, it does not support select [0] and call remove() on
SVG element/node ... dunno, need to check. But now it works on Chrome
and Safari