Update some bugs and xml parsing