[FIX] several fixes after the merge, repaired advanceChunk and reserveChunk of stream iterator