fix to support subtasks in java