hack to avoid ByteList to throw ArrayOutOfBoundsException