Fix bugs in T()