fix stream attribute errors