Set limit on n_streams (Issue 2076)

Fixes #2076 .