fixed put_xml with header