(regesm) : backport fix for integral calculation