fix undo storage