Fixed a streaming bug that truncated last line