Factorial program doesn't work, fixed it