Fixed bug in CouponForm and added a test for it.