Added a condition to the render function to update the window properly when using the range slider and streaming data.