fixing tds row count