fixed a bug in xml parsing