within-day replanning agents needs to have a plan element/leg after the activity at whose end within-day replanning is called. otherwise, they become inactive too early so that within-day replanning is actually never executed. added this leg + some minor additional changes.