correctly deserialize Task.stageId