Bug fix: passing a provider of a stream, because the stream may be
processed more than once and if it is it sends an exception