Fixed const-correctness for streams.