diff --git a/Common/onelab.h b/Common/onelab.h
index 338ec47606225a4522908d05c128c47978250140..0a49bb04e8e004b3bfbfc556a9da2c7cd7ae2eac 100644
--- a/Common/onelab.h
+++ b/Common/onelab.h
@@ -330,7 +330,7 @@ namespace onelab{
               << ", \"name\":\"" << sanitize(getName()) << "\""
               << ", \"label\":\"" << sanitize(getLabel()) << "\""
               << ", \"help\":\"" << sanitize(getHelp()) << "\""
-              << ", \"changedValue\":" << getChangedValue() << "\""
+              << ", \"changedValue\":" << getChangedValue()
               << ", \"visible\":" << (getVisible() ? "true" : "false")
               << ", \"readOnly\":" << (getReadOnly() ? "true" : "false")
               << ", \"attributes\":{ ";
@@ -858,11 +858,13 @@ namespace onelab{
       for(std::set<parameter*, parameterLessThan>::const_iterator it = ps.begin();
           it != ps.end(); it++){
         if(client.empty() || (*it)->hasClient(client)){
-	  if((*it)->getAttribute("NotInDb") != "True")
+	  if((*it)->getAttribute("NotInDb") != "True"){
+            if(it != ps.begin()) json += ", ";
 	    json += "    " + (*it)->toJSON() + "\n";
+          }
 	}
       }
-      json += "] }\n";
+      json += "] }\n}\n";
     }
   };