More reliable stream termination