Fixed string stream

Better way to initialize the stream for cross platform compatibility