fix exception when confirm a purchase