fix MAX_UPPER_BOUND_FOR_DISCRETE