Fix data saving