Certificate management fixes