fix T_to_J bug