fix the save bug