made preallocation of ByteBuffer more robust, respecting the configured UID width