better support for finite streams