fix ca cert check