Found a bug in undo and I fixed it