fix the bug of phi(1) = 1