diff --git a/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/python/egammaD3PD.py b/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/python/egammaD3PD.py
index 29bf2a9878c535195860bc009e0cfedcea3d6c2b..4e13f4f8639febd796576bb14c07e11ca2643b5d 100644
--- a/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/python/egammaD3PD.py
+++ b/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/python/egammaD3PD.py
@@ -205,18 +205,10 @@ class MergeElectrons (PyAthena.Alg):
         sg.record (enew, 'AllElectrons')
         cfgKeyStore.addTransient ('xAOD::ElectronContainer', 'AllElectrons')
 
-        #e1 = sg['StacoMuonCollection']
-        e1 = sg.retrieve (ROOT.DataVector(ROOT.xAOD.Electron_v1), 'AllElectrons')
-        #if e1.size() > 0:
-        #    reg = ROOT.SG.AuxTypeRegistry.instance()
-        #    auxids = list(e1[0].getAuxIDs())
-        #    auxids = [(reg.getName(id), id) for id in auxids]
-        #    auxids.sort()
-        #    print 'aaa', auxids
-        # if e2.size() > 0:
-        #     acc = ROOT.SG.AuxElement.TypelessConstAccessor ('Loose')
-        #     print 'bbb2', acc.isAvailable(e2[0])
-
+        # Make sure these aux variables are defined at this point.
+        ROOT.xAOD.ElectronAuxContainer()
+        ROOT.xAOD.CaloClusterAuxContainer()
+               
         return StatusCode.Success
         
 
diff --git a/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/share/AODToEgammaD3PD.py b/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/share/AODToEgammaD3PD.py
index dfa8e02ffd393d1475db8f6d90137207f9bfb8b0..f573679f8666fcb201473dbfe902a3c052718074 100644
--- a/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/share/AODToEgammaD3PD.py
+++ b/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/share/AODToEgammaD3PD.py
@@ -57,6 +57,9 @@ muonRecFlags.doMSVertex.set_Value_and_Lock( False )
 
 #from xAODJetCnv import ParticleJetCompatibility
 
+
+include( "RecExCommon/RecExCommon_topOptions.py" )
+
 # Block loading conditions folders we won't need.
 blocked_folders = [
     '/CALO/Identifier/CaloTTOnAttrIdMapAtlas',
@@ -80,5 +83,3 @@ for f in blocked_folders:
     conddb.blockFolder (f)
 
 
-include( "RecExCommon/RecExCommon_topOptions.py" )
-