fix save settings and keypair return functions