Should it not be `rstream->stream = stream`?