Fixed a bug when using libxml2