better way to fix the totals issue lower down in the stack