Update misc.js

When we group SVG's elements we should return always a pathgroup, it semplifies the logic after.