Revert "Revert "Fix corrupt chunksending", previous commit fixed it and this just decreases performance.", just didn't show up in testing due to bad luck

This reverts commit 8d907aa1cbafced657c29ed2ad532d14108b6bdf.