Fixing data save bug