fix saving error