error correction for data saving

Please change to this version.