Fixed bug on save