Replacing some workflow.save() with stage.save() and task.save()