Fixing bad xml in script only code