fixed time-stepping gradient computation for position control case
Merge pull request #298 from kuindersma/fix-position-control-gradients

fixed time-stepping gradient computation for position control case