restore the stream