unique discount code use logic fix