bug fix for coupon logic