Fix minor bug due to unitialized variable in InputStream