Merge fail - did call on_stream_close twice
Ensure on_stream_close before stream_delete

Two places where the callback was lost