fixes for pki support