fixed bug in get_tsn