fixed stdin streaming