diff --git a/Control/AthenaServices/src/AthenaEventLoopMgr.cxx b/Control/AthenaServices/src/AthenaEventLoopMgr.cxx
index 5e60b985909c98998b7a981835a2348f408eb98f..49aa994053b0547af31acb4bf333d840e7f96e8e 100644
--- a/Control/AthenaServices/src/AthenaEventLoopMgr.cxx
+++ b/Control/AthenaServices/src/AthenaEventLoopMgr.cxx
@@ -1226,8 +1226,9 @@ StatusCode AthenaEventLoopMgr::installEventContext (EventContext& ctx,
   ctx.setEventID(pEvent);
   ctx.set(m_nev,0);
 
-  ctx.setExtension( Atlas::ExtendedEventContext( eventStore()->hiveProxyDict(),
-                                                 conditionsRun) );
+  Atlas::setExtendedEventContext(ctx,
+                                 Atlas::ExtendedEventContext( eventStore()->hiveProxyDict(),
+                                                              conditionsRun) );
   Gaudi::Hive::setCurrentContext( ctx );
 
   m_aess->reset( ctx );
diff --git a/Control/AthenaServices/src/AthenaHiveEventLoopMgr.cxx b/Control/AthenaServices/src/AthenaHiveEventLoopMgr.cxx
index a14f820fd9a15aa77ace35ec833586893d1088f4..b5dc6cbc57d0dc3d7b0fab4b4248f038dff88856 100644
--- a/Control/AthenaServices/src/AthenaHiveEventLoopMgr.cxx
+++ b/Control/AthenaServices/src/AthenaHiveEventLoopMgr.cxx
@@ -627,7 +627,7 @@ StatusCode AthenaHiveEventLoopMgr::executeEvent( EventContext &&ctx )
       conditionsRun = (*attr)["ConditionsRun"].data<unsigned int>();
     }
   }
-  ctx.template getExtension<Atlas::ExtendedEventContext>().setConditionsRun (conditionsRun);
+  Atlas::getExtendedEventContext(ctx).setConditionsRun (conditionsRun);
   Gaudi::Hive::setCurrentContext ( ctx );
 
   // Record EventContext in current whiteboard
@@ -1218,7 +1218,8 @@ EventContext AthenaHiveEventLoopMgr::createEventContext() {
             << " could not be selected for the WhiteBoard" << endmsg;
     return EventContext{};       // invalid EventContext
   } else {
-    ctx.setExtension( Atlas::ExtendedEventContext( eventStore()->hiveProxyDict() ) );
+    Atlas::setExtendedEventContext(ctx,
+                                   Atlas::ExtendedEventContext( eventStore()->hiveProxyDict() ) );
 
     debug() << "created EventContext, num: " << ctx.evt()  << "  in slot: " 
 	    << ctx.slot() << endmsg;