reading xml bug fix