fix extgcd2