Fix bugs in two undo functions (resume all / last step(s)).