saving bug fix