Fixes some nasty little bugs with SVG classes and timing of collection updates.