Fix XML formator bug