Fix handling of streams with no data.