(tvist) added ub/lb invert range check