Fix a bug in couponCompute