Behavior Designer - Wander

Hi, i modified the code of the “Wander” task. My target was to have a task only for one random target. Now it returns success and the character (gameobject with the behavior tree designer scripts, aipath.cs, seeker.cs) is moving only one time. But there is one problem. In the beh. tree if the task “Wander” is started a second time (or more) the character will not move. All other tasks after the Wander task will be started and returned success (for example start an animation). All the following task after Wander do what the have to do. But the character is not moving. It looks like that Wander is started only one time.
If i used “Seek transform” the character is moving to the target position. So this works correctly.
Hope you can help.The best would be to have the “Wander” task which will return success. Maybe you know how to modify the original code of the “Wander” task.

here is the code
public override void OnStart()
{
base.OnStart();
_character = GetComponent();
_characterAnimation = _character.GetComponent();
_destinationReachTime = -_pauseTime;
_characterAnimation.SetState(CharacterState.Walk);
}

    public override TaskStatus OnUpdate()
    {
        if (!HasPath() || HasArrived()) 
        {
            if (maxPauseDuration.Value > 0) 
            {
                if (_destinationReachTime == -1) {
                    _destinationReachTime = Time.time;
                    _pauseTime = Random.Range(minPauseDuration.Value, maxPauseDuration.Value);
                    _characterAnimation.SetState(CharacterState.Idle);
                    return TaskStatus.Success;
                }
                if (_destinationReachTime + _pauseTime <= Time.time) {
                    _characterAnimation.SetState(CharacterState.Walk);
                    if (TrySetTarget())
                        _destinationReachTime = -1;
                }
            } 
            else
                TrySetTarget();
        }
        return TaskStatus.Running;
    }
    
    public override void OnEnd()
    {
        base.OnEnd();
        if (stopOnTaskEnd.Value) {
            Stop();
        }
        _characterAnimation.SetState(CharacterState.Idle);
    }

    bool TrySetTarget()
    {
        var direction = transform.forward + Random.insideUnitSphere * wanderRate.Value;
        var destination = transform.position + direction.normalized * Random.Range(minWanderDistance.Value, maxWanderDistance.Value);
        SetDestination(SamplePosition(destination));
        return true;
    }