tweaks of prod functions
Merge pull request #7040 from lindahua/dh/prod2

tweaks of prod functions