fixed bug in DTS generation