more logic bugs fixed regarding discounts