diff --git a/blockstack/lib/client.py b/blockstack/lib/client.py
index <HASH>..<HASH> 100644
--- a/blockstack/lib/client.py
+++ b/blockstack/lib/client.py
@@ -3496,6 +3496,15 @@ def resolve_profile(name, include_expired=False, include_name_record=False, host
         profile_data = jwt['payload']['claim']
         public_key = str(jwt['payload']['issuer']['publicKey'])
 
+        # return public key that matches address 
+        pubkeys = [virtualchain.ecdsalib.ecdsa_public_key(keylib.key_formatting.decompress(public_key)),
+                   virtualchain.ecdsalib.ecdsa_public_key(keylib.key_formatting.compress(public_key))]
+
+        if name_rec['address'] == pubkeys[0].address():
+            public_key = pubkeys[0].to_hex()
+        else:
+            public_key = pubkeys[1].to_hex()
+
         ret = {
             'profile': profile_data,
             'zonefile': zonefile_txt,
use the right public key that matches the owner address