Fix XML processing