fixed bug upper bounds