Updated stream initialization to fix test