added some xml data checks