reset stream on destroy or end