Adding type casting to tid variable