fix a bug where a boolean type false in stream can cause stream malfunction