Fixed totals bug