fixed error when calculating line items with quantity more thane one