fix bug #3678 (cuda::integral failures)
Merge pull request #2749 from jet47:fix-bug-3678