Support for writing out the composite attribute, as well as a little bug fix.