Fixed bad indexing with taus TD calculation