Fix xml bugs.