fix tag loop