Fixing bug that could cause old XML data to be overwritten.