xml parsing bug fix, incomplete