streams: fix finish event not emitted sometimes