Fixed bug and performance improved in factorial function.
Merge branch 'hotfix/factorial_bug'