diff --git a/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.cxx b/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.cxx
index a67569805dabd67ccaf346cb9fb8204be3371c74..6cdac043e136aedb6cb75e03d352961f71ea7efe 100644
--- a/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.cxx
+++ b/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.cxx
@@ -169,7 +169,7 @@ void G4AtlasAlg::initializeOnce()
 
   // Send UI commands
   ATH_MSG_DEBUG("G4 Command: Trying at the end of initializeOnce()");
-  for (auto g4command : m_g4commands) {
+  for (const auto& g4command : m_g4commands) {
     int returnCode = ui->ApplyCommand( g4command );
     commandLog(returnCode, g4command);
   }