fixed bug in CupDiscount