Fix off-by-one in block allocation