diff --git a/include/dynamic-graph/command.h b/include/dynamic-graph/command.h
index c8ad75e8edc5253654b7d740f88d4ab845e6c86a..15824c988142e15750e61912f5abacbcb05d5382 100644
--- a/include/dynamic-graph/command.h
+++ b/include/dynamic-graph/command.h
@@ -40,11 +40,11 @@ namespace dynamicgraph {
       /// \param valueTypes vector specifying the number and types of parameters
       Command(Entity& entity, const std::vector<Value::Type>& valueTypes);
       /// Return the value type of all parameters
-      const std::vector<Value::Type>& valueTypes() const;
+      const std::vector<Value::Type> valueTypes() const;
       /// Set parameter values
       void setParameterValues(const std::vector<Value>& values);
       /// Get parameter values
-      const std::vector<Value>& getParameterValues() const;
+      const std::vector<Value> getParameterValues() const;
       /// Execute the command after checking parameters
       Value execute();
       /// Get a reference to the Entity owning this command
diff --git a/src/command/command.cpp b/src/command/command.cpp
index 8411c58ae974d0206682f4d4712f08f740a95347..eb89ec8245cbaa9039a3720868071de73c0070bf 100644
--- a/src/command/command.cpp
+++ b/src/command/command.cpp
@@ -29,7 +29,7 @@ namespace dynamicgraph {
     {
     }
 
-    const std::vector<Value::Type>& Command::valueTypes() const
+    const std::vector<Value::Type> Command::valueTypes() const
     {
       return valueTypeVector_;
     }
@@ -62,7 +62,7 @@ namespace dynamicgraph {
       }
     }
 
-    const std::vector<Value>& Command::getParameterValues() const
+    const std::vector<Value> Command::getParameterValues() const
     {
       return valueVector_;
     }