Fixed a bug that stream is generated duplicate.