fixed function typo in lib/stream