fixing malformed xml