Improve stream close and reset

Fixes issue where finish flag gets incorrectly set when a new stream sets the finish flag