Total amount recalculation fix for some cases