helpers/stream.lua: fixed bug