fix printing of totals