fix input stream for already buffered data