fixed bug that mucked up totals calc