diff --git a/src/account_factory.cpp b/src/account_factory.cpp
index f4e08b029ef0004626f7a9f1476df11dd733d81a..0f1c1850ffd90e9ac4a9a34496c6a29ca143de8a 100644
--- a/src/account_factory.cpp
+++ b/src/account_factory.cpp
@@ -76,12 +76,12 @@ AccountFactory::isSupportedType(const char* const name) const
 void
 AccountFactory::removeAccount(Account& account)
 {
-    const auto account_type = account.getAccountType();
+    const auto* account_type = account.getAccountType();
 
     std::lock_guard<std::recursive_mutex> lock(mutex_);
     const auto& id = account.getAccountID();
     RING_DBG("Removing account %s", id.c_str());
-    auto& map = accountMaps_.at(account.getAccountType());
+    auto& map = accountMaps_.at(account_type);
     map.erase(id);
     RING_DBG("Remaining %zu %s account(s)", map.size(), account_type);
 }
diff --git a/src/manager.cpp b/src/manager.cpp
index 618c2228ef21bcffa50574c624d286806190f43f..33a131f985571d363eb8a62d349979c477b06c59 100644
--- a/src/manager.cpp
+++ b/src/manager.cpp
@@ -3023,12 +3023,12 @@ Manager::newOutgoingCall(const std::string& toUrl,
     // If no prefered or not suitable account given,
     // find first usable account depending on url scheme.
     if (toUrl.find("ring:") != std::string::npos) {
-        if (!account or account->getAccountType() != RingAccount::ACCOUNT_TYPE) {
-            account = findAccount<RingAccount>([](const std::shared_ptr<RingAccount>& acc){
-                                                   return acc->isUsable();
-                                               });
+        if (!account or ::strcmp(account->getAccountType(), RingAccount::ACCOUNT_TYPE)) {
+            account = findAccount<RingAccount>([] (const std::shared_ptr<RingAccount>& acc) {
+                    return acc->isUsable();
+                });
         }
-    } else if (!account or account->getAccountType() != SIPAccount::ACCOUNT_TYPE) {
+    } else if (!account or ::strcmp(account->getAccountType(), SIPAccount::ACCOUNT_TYPE)) {
         // For IP url restricts results on IP2IP accounts
         auto strippedToUrl = toUrl;
         sip_utils::stripSipUriPrefix(strippedToUrl);
diff --git a/src/sip/sipvoiplink.cpp b/src/sip/sipvoiplink.cpp
index d25b3a76276463e0da6e246abfb620157f4ec0f6..d6e4a95bed34614597ec4fcec184e84d86a3dd7e 100644
--- a/src/sip/sipvoiplink.cpp
+++ b/src/sip/sipvoiplink.cpp
@@ -294,7 +294,7 @@ transaction_request_cb(pjsip_rx_data *rdata)
     // Append PJSIP transport to the broker's SipTransport list
     auto transport = link->sipTransportBroker->addTransport(rdata->tp_info.transport);
     if (!transport) {
-        if (account->getAccountType() == SIPAccount::ACCOUNT_TYPE) {
+        if (::strcmp(account->getAccountType(), SIPAccount::ACCOUNT_TYPE)) {
             RING_WARN("Using transport from account.");
             transport = std::static_pointer_cast<SIPAccount>(account)->getTransport();
         }