Node streams are finished too early