Fix chaining of subtasks.