fix compile errors on gcd kernel