fix ending the stream