Fix tdata bug