Fix computation of upper bound to optimal solution.