Fix `endStream` method
Update package.json