fix factorial test case