More to_xml nesting fixes!