fix a tds bug