fixes for T2 script