Fixed bug in opening stream