fixed some xml bugs