fixing totals counts