fix streaming bugs