Added control on task type when second order kinematics is set