repair stupid XML output errors