TDL script fix