diff --git a/Trigger/TriggerCommon/TriggerMenu/python/bjet/generateBjetChainDefs.py b/Trigger/TriggerCommon/TriggerMenu/python/bjet/generateBjetChainDefs.py
index 81fb9c670f5483f62d93cc40c4ad8bf4a5838f2b..3c1134964d5dc1f894791349d6437f3ae0b817f8 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/bjet/generateBjetChainDefs.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/bjet/generateBjetChainDefs.py
@@ -293,31 +293,31 @@ def buildBjetChainsAllTE(theChainDef, bjetdict, numberOfSubChainDicts=1):
     secVtxTE        = jetTrackTE+"__"+"secVtx"
     theChainDef.addSequence(theVxSecondary, [jetTrackTE, comboPrmVtxTE], secVtxTE)
 
-    #
-    #  the tagging fex
-    #
-    log.debug("Getting tagging fex")
-    theBjetFex = getBtagFexSplitInstance(algoInstance, "2012", "EFID") 
-    btaggingTE = secVtxTE+"_btagged"
-    theChainDef.addSequence(theBjetFex, secVtxTE, btaggingTE)
-
     #
     #  GSC calculation
     #
-
     if doGSC:
-        gsc_jetTrackTEPreCut  = "HLT_precut_gsc"+str(minBTagThreshold)+"_eta"+"_jsplit"+"_"+tracking+"_ALLTE"
+        gsc_jetTrackTEPreCut  = "HLT_precut_gsc"+str(minBTagThreshold)+"_eta"+"_jsplit"+"_"+tracking
         theGSCFex      = getGSCFexSplitInstance(algoInstance)
-        theChainDef.addSequence(theGSCFex,      btaggingTE                ,       gsc_jetTrackTEPreCut )
+        theChainDef.addSequence(theGSCFex,      secVtxTE                ,       gsc_jetTrackTEPreCut )
 
         algoInstance = "GSC"   
-        gsc_jetTrackTE        = "HLT_gsc"+str(minGSCThreshold)+"_eta"+"_jsplit"+"_"+tracking+"_ALLTE"
+        gsc_jetTrackTE        = "HLT_gsc"+str(minGSCThreshold)+"_eta"+"_jsplit"+"_"+tracking
         theGSCEtHypo   = getBjetEtHypoInstance(algoInstance, "Btagging", str(minGSCThreshold) +"GeV" )
         theChainDef.addSequence(theGSCEtHypo,   gsc_jetTrackTEPreCut,           gsc_jetTrackTE )
-        nextToLastTE = gsc_jetTrackTE
+        jetsForBTagging = gsc_jetTrackTE 
     else:
         log.debug("No GSC Calculation")
-        nextToLastTE = btaggingTE
+        jetsForBTagging = secVtxTE
+
+
+    #
+    #  the tagging fex
+    #
+    log.debug("Getting tagging fex")
+    theBjetFex = getBtagFexSplitInstance(algoInstance, "2012", "EFID") 
+    btaggingTE = jetsForBTagging+"_btagged"
+    theChainDef.addSequence(theBjetFex, jetsForBTagging, btaggingTE)
 
     #
     #  The btagging hypo
@@ -352,7 +352,7 @@ def buildBjetChainsAllTE(theChainDef, bjetdict, numberOfSubChainDicts=1):
 
     #theChainDef.signatureList[-1]['listOfTriggerElements'][0]
     log.debug("Adding Sequence")
-    theChainDef.addSequence(theBjetHypoAllTE, nextToLastTE, lastTEout, topo_start_from = topoStartFrom)
+    theChainDef.addSequence(theBjetHypoAllTE, btaggingTE, lastTEout, topo_start_from = topoStartFrom)
 
     log.debug("Adding Signature")
     theChainDef.addSignature(theChainDef.signatureList[-1]['signature_counter']+1, [lastTEout])