Fixed bad discount code 500 error.