get stream piped correctly