change to use stream_soft_next; fix bugs in visualize_demo when facing zero-length data