Fix edge case
Add unit test for tid translation