Fixes computation error when missing value in purchase_item