Fix tag undo issues.