accounts for the lazy initalization of availableStreamId array and fixes the following exception stack TypeError: Cannot read property 'length' of undefined