Fixing bugs in getCertName