Bug correction in render_stream