Fixing bug with t script