Fixed error in Pollard Brent algorithm