further test cases for gcd and fixes for them