make sure to close value scope for each tasks.