Change mode_static to mode_stream