Fix XML logging