fix memory leak in PurchaseWithMarket: fixes #54