fix the xml data saving