Corrected variable declarations in TDC functions