bugfix for Xmath.factorial