Undo was leaking memory.