fixes for streaming mode.