Fixed data saving bug