fixed an off-by-one error in unpack_cell's return value