Fixed bug on data save