fixed time-stepping gradient computation for position control case

resolves #82