Fix infinite_stream handling