bugfix: userpref_gen_keys_and_cert occurs error in generating keys