Automatically calculate bag payload. Fixes #61