Merge "Fix a bug where the wrong profile is queried"