Fixed several bugs for both adapters (gpg and gc)