fix error of saving