fix for getAsXml method