Fixing bug where attributes in the root element broke.