Fixed crash when reading bytes from the CryptoStream.