handle everyway a stream ends
4.1.5