Fixing XML syntax errors