diff --git a/src/ros_joint_state.cpp b/src/ros_joint_state.cpp
index f35991075bf43fe987dd9d05fe3e0e8cef6b5161..d2e1ba928c4a03b3586cbccd7e33b75635e33a3c 100644
--- a/src/ros_joint_state.cpp
+++ b/src/ros_joint_state.cpp
@@ -5,7 +5,7 @@
 #include <dynamic-graph/command.h>
 #include <dynamic-graph/factory.h>
 #include <dynamic-graph/pool.h>
-#include <sot-dynamic/dynamic.h>
+#include <sot-dynamic-pinocchio/dynamic-pinocchio.h>
 
 #include "dynamic_graph_bridge/ros_init.hh"
 #include "ros_joint_state.hh"
@@ -76,12 +76,12 @@ namespace dynamicgraph
 	  return Value ();
 	}
 
-      dynamicgraph::sot::Dynamic* dynamic =
-	dynamic_cast<dynamicgraph::sot::Dynamic*>
+      dynamicgraph::sot::DynamicPinocchio* dynamic =
+	dynamic_cast<dynamicgraph::sot::DynamicPinocchio*>
 	(&dynamicgraph::PoolStorage::getInstance ()->getEntity (name));
       if (!dynamic)
 	{
-	  std::cerr << "entity is not a Dynamic entity" << std::endl;
+	  std::cerr << "entity is not a DynamicPinocchio entity" << std::endl;
 	  return Value ();
 	}