fixed lower and upper bound bug