fixed bug in xml parsing