Correcct the setTaskGoal method.