diff --git a/src/cltools/Driver.cpp b/src/cltools/Driver.cpp
index e237129193f254c125b02acd536f500b5253337e..450fa5cae24af4982d55dd052476a86296f4673a 100644
--- a/src/cltools/Driver.cpp
+++ b/src/cltools/Driver.cpp
@@ -257,7 +257,6 @@ int Driver<real>::main(FILE* in,FILE*out,Communicator& pc){
   p.cmd("setRealPrecision",&rr);
   int checknatoms=-1;
   int plumedStopCondition=0;
-  p.cmd("setStopFlag",&plumedStopCondition);
   int step=0;
   if(Communicator::initialized()){
     if(multi){
@@ -422,6 +421,7 @@ int Driver<real>::main(FILE* in,FILE*out,Communicator& pc){
     }
 
     p.cmd("setStep",&step);
+    p.cmd("setStopFlag",&plumedStopCondition);
     if(!noatoms){
        if(trajectory_fmt=="xyz"){
          if(!Tools::getline(fp,line)) error("premature end of trajectory file");
diff --git a/src/core/PlumedMain.cpp b/src/core/PlumedMain.cpp
index 6e1e0f10e07ccf5ce54a19db96346c26e1332ca5..24e36d17bb13bd779dcae2860b14923de7ae345b 100644
--- a/src/core/PlumedMain.cpp
+++ b/src/core/PlumedMain.cpp
@@ -289,11 +289,11 @@ void PlumedMain::cmd(const std::string & word,void*val){
        CHECK_NOTINIT(initialized,word);
        CHECK_NULL(val,word);
        log.open(static_cast<char*>(val),"w");
+// other commands that should be used after initialization:
   } else if(word=="setStopFlag"){
-       CHECK_NOTINIT(initialized,word);
+       CHECK_INIT(initialized,word);
        CHECK_NULL(val,word);
        stopFlag=static_cast<int*>(val);
-// other commands that should be used after initialization:
   } else if(word=="getExchangesFlag"){
        CHECK_INIT(initialized,word);
        CHECK_NULL(val,word);