fixed rollsum with inspiration from camlistore rollsum