handle bad xml better