fix for the double save bug