diff --git a/Common/GmshMessage.cpp b/Common/GmshMessage.cpp
index 4e760d082c0f4d88e2c2988d8980a099b7cd201f..02feed5553ea4cf49697932649c3c16aa43a60b3 100644
--- a/Common/GmshMessage.cpp
+++ b/Common/GmshMessage.cpp
@@ -649,8 +649,11 @@ void Msg::ExchangeOnelabParameter(const std::string &key,
   std::vector<onelab::number> ps;
   _onelabClient->get(ps, name);
   bool noRange = true, noChoices = true, noLoop = true, noGraph = true;
-  if(ps.size()){ // use value from server
-    val[0] = ps[0].getValue();
+  if(ps.size()){ 
+    if(ps[0].getReadOnly())
+      ps[0].setValue(val[0]); // use value from gmsh
+    else
+      val[0] = ps[0].getValue(); // use value from server
     // keep track of these attributes, which can be changed server-side
     if(ps[0].getMin() != -onelab::parameter::maxNumber() ||
        ps[0].getMax() != onelab::parameter::maxNumber() ||