Fixed an issue with data saving.