cherry pick td array format fix from master