fix chunking

with this fix, all the integration tests are successful