Fixed Cert checking