Bug fix in PurchaseApi.