fix double save bug