fix a bug in setting the upper bound of linear constraints