Fix double save bug