small fix for inputStream