Fixed the normalization in the top-level modular_gcd algorithm