fixed a stream bug