fix xml generation