Fix undisposed stream in test