Fix freeze when file streaming is complete.