Switched undo closures to use `do` keyword