fix use of ExternallyOwnedMemoryBinaryInputStream