Fixed bug in reading array of bytes from the wrapped InputStream