Bugfixes for NonBlockingInputStreamReader.