fix stream end issue
1.2.1