FIX: fix gcd mistake.