Auto calculate payload while editing a bag. Fixes #97