Changed ceiling() to max(1,round()) in BstarCB per Dimitris's suggestion