Fixing broken tests, making sure to watch for closed streams