diff --git a/src/ZMPRefTrajectoryGeneration/OrientationsPreview.cpp b/src/ZMPRefTrajectoryGeneration/OrientationsPreview.cpp
index 951d55c04500737063dcd5c86b6f6b5cd638bc9f..44a7a8a3354f31e1af4e88e37613681a1ac25cf5 100644
--- a/src/ZMPRefTrajectoryGeneration/OrientationsPreview.cpp
+++ b/src/ZMPRefTrajectoryGeneration/OrientationsPreview.cpp
@@ -43,7 +43,7 @@ OrientationsPreview::OrientationsPreview( CjrlHumanoidDynamicRobot *aHS)
 
   // left hip
   CjrlJoint * leftFoot  = aHS->leftFoot()->associatedAnkle();
-  CjrlJoint * leftHip   = aHS->jointsBetween(*waist, *leftFoot)[0];
+  CjrlJoint * leftHip   = aHS->jointsBetween(*waist, *leftFoot)[1];
 
   lLimitLeftHipYaw_  = leftHip->lowerBound(0);//-30.0/180.0*M_PI;
   uLimitLeftHipYaw_  = leftHip->upperBound(0);//45.0/180.0*M_PI;
@@ -55,7 +55,7 @@ OrientationsPreview::OrientationsPreview( CjrlHumanoidDynamicRobot *aHS)
 
   // right hip
   CjrlJoint * rightFoot = aHS->rightFoot()->associatedAnkle();
-  CjrlJoint * rightHip  = aHS->jointsBetween(*waist, *rightFoot)[0];
+  CjrlJoint * rightHip  = aHS->jointsBetween(*waist, *rightFoot)[1];
 
   lLimitRightHipYaw_ = rightHip->lowerBound(0);//-45.0/180.0*M_PI;
   uLimitRightHipYaw_ = rightHip->upperBound(0);//30.0/180.0*M_PI;