Fixed issue where change in quantity breaks ability to calculate totals