Fixed asXML error and addChild flaw.