Fixed issue where stream was getting closed prematurely, causing all tests to fail