Fix issue with long streams