fix of data saving