fix stream crash
LX-5490
fix flow