Updated use of streams for the new SDK which fixes a related bug