diff --git a/src/ros_joint_state.cpp b/src/ros_joint_state.cpp
index 4837afe8280b4e707c669724abafb6b26c325f93..1ff7087182e5b3258486c862ec4ae4939f43a6cc 100644
--- a/src/ros_joint_state.cpp
+++ b/src/ros_joint_state.cpp
@@ -38,12 +38,12 @@ namespace dynamicgraph
     namespace {
       void  buildJointNames (sensor_msgs::JointState& jointState, se3::Model* robot_model) {
 	int cnt = 0;
-	for (int i=1;i<robot_model.nbody;i++) {
+	for (int i=1;i<robot_model->nbodies;i++) {
 	  // Ignore anchors.
 	  if (se3::nv(robot_model->joints[i]) != 0) {
 	    // If we only have one dof, the dof name is the joint name.
 	    if (se3::nv(robot_model->joints[i]) == 1) {
-	      jointState.name[cnt] =  robot_model.names[i];
+	      jointState.name[cnt] =  robot_model->names[i];
 	      cnt++;
 	    }
 	    else {
@@ -86,7 +86,7 @@ namespace dynamicgraph
 	}
 
       se3::Model* robot_model = dynamic->m_model;
-      if (robot_model->nbody == 1)
+      if (robot_model->nbodies == 1)
 	{
 	  std::cerr << "no robot in the dynamic entity" << std::endl;
 	  return Value ();