Bug fix for target position control