Fixed a bug in JS prime factorizer.