exclusiveUB needs to be < not <=.