Properly set direction of stream_input.