diff --git a/idl/hpp/corbaserver/rbprm/rbprmbuilder.idl b/idl/hpp/corbaserver/rbprm/rbprmbuilder.idl
index e7dd4dd58baeb5343b3fe000092894e59ae94064..ced397cd6877088562aff5f14bfc58b451ecb7ca 100755
--- a/idl/hpp/corbaserver/rbprm/rbprmbuilder.idl
+++ b/idl/hpp/corbaserver/rbprm/rbprmbuilder.idl
@@ -249,7 +249,7 @@ module hpp
     /// \param contactType whether the contact is punctual ("_3_DOF") or surfacic ("_6_DOF")
     /// \param disableEffectorCollision whether collision detection should be disabled for the end effector bones
     void addLimb(in string id, in string limb, in string effector, in floatSeq offset, in floatSeq normal,
-                 in double x, in double y, in unsigned short samples, in string heuristicName,
+                 in double x, in double y, in unsigned long samples, in string heuristicName,
                  in double resolution, in string contactType,  in double disableEffectorCollision,
                  in double grasp) raises (Error);
 
diff --git a/src/rbprmbuilder.impl.cc b/src/rbprmbuilder.impl.cc
index d6f6c1be1c6d9c8b3d34ce1cc69bb0327a977797..3d67263203de97ef22219928cc2588fc7de2fa83 100755
--- a/src/rbprmbuilder.impl.cc
+++ b/src/rbprmbuilder.impl.cc
@@ -1068,7 +1068,7 @@ namespace hpp {
     }
 
     void RbprmBuilder::addLimb(const char* id, const char* limb, const char* effector, const hpp::floatSeq& offset, const hpp::floatSeq& normal, double x, double y,
-                               unsigned short samples, const char* heuristicName, double resolution, const char *contactType, double disableEffectorCollision, double grasp) throw (hpp::Error)
+                               unsigned int samples, const char* heuristicName, double resolution, const char *contactType, double disableEffectorCollision, double grasp) throw (hpp::Error)
     {
         if(!fullBodyLoaded_)
             throw Error ("No full body robot was loaded");
diff --git a/src/rbprmbuilder.impl.hh b/src/rbprmbuilder.impl.hh
index 36a48127355b28b58a48642252fbfc6a557eb4f3..c5745f4caa026c4d9ba3aa00b6cf14bb6b138890 100755
--- a/src/rbprmbuilder.impl.hh
+++ b/src/rbprmbuilder.impl.hh
@@ -239,7 +239,7 @@ namespace hpp {
                                                    double octreeNodeId) throw (hpp::Error);
 
         virtual void addLimb(const char* id, const char* limb, const char* effector, const hpp::floatSeq& offset, const hpp::floatSeq& normal, double x, double y,
-                             unsigned short samples, const char *heuristicName, double resolution, const char *contactType,
+                             unsigned int samples, const char *heuristicName, double resolution, const char *contactType,
                              double disableEffectorCollision, double grasp) throw (hpp::Error);
         virtual void addLimbDatabase(const char* databasePath, const char* id, const char* heuristicName, double loadValues,
                                      double disableEffectorCollision, double grasp) throw (hpp::Error);