removed stream.pos