Fixing some problems with SVG elements selection