fix xml encoding issues