func: upper_bound_bean important bug fix, however program still works only from even bean sizes