Fixes for serialization to XML.