Fixed some issues in HostedXmlBuilder.cs