Fixed an issue with the totals feature