fixed bug in function SetFactorSumBProduct in SetFactor.py