Restore ans to previous value when undo.
fixes segmentation fault error on repeatedly clicking undo
Releasing 3.10.3.