Fixed Undo/Redo. (Still a bug when undo tabbing).