softgel.jsx: fixed the problem with undo() crashing. (by A.J.Hammerschmidt)