Fix to totals counting