Animation goes wacky at the end

I loaded a ms3d file with animations in the keyframes and it works all fine except at the end the animation goes wacky for 2 seconds.  This happens no matter what animation I pick.  Has anyone had similar experience?

 
           JointController controller = (JointController) model.getController(0);
           

  
          
            //animation
           
            //int startFrame=130,  endFrame=148;
            int startFrame=381,  endFrame=428;
            controller.setSpeed(1f);
          controller.setActive(true);
          controller.setTimes(startFrame, endFrame);
          //controller.setRepeatType(Controller.);
          controller.setActive(true); 

the animation only goes wacky when there's a big motion of the legs or arms, such as in running…