Some bug fixing for Public key upload and Certificate management