SWC-1436: fix chunk calculation
Merge pull request #991 from jay-hodgson/release-44

SWC-1436: fix chunk calculation