ByteArrayInputStream fix