bug fix writing xml elements