diff --git a/daemon/src/managerimpl.cpp b/daemon/src/managerimpl.cpp
index 52807e5bb4f82919b8cc6838d4b993c450735617..41caaa7c5fd4dde8352dc47552d9e1ffd93ef843 100644
--- a/daemon/src/managerimpl.cpp
+++ b/daemon/src/managerimpl.cpp
@@ -2580,21 +2580,21 @@ namespace {
         item->getValue("alias", &accountAlias);
 
         if (!accountid.empty() and !accountAlias.empty() and accountid != SIPAccount::IP2IP_PROFILE) {
-            Account *a;
+            if (accountType == "SIP") {
+                Account *a = new SIPAccount(accountid);
+                sipAccountMap[accountid] = a;
+                a->unserialize(*item);
+            } else if (accountType == "IAX") {
 #if HAVE_IAX
-            if (accountType == "IAX") {
-                a = new IAXAccount(accountid);
+                Account *a = new IAXAccount(accountid);
                 iaxAccountMap[accountid] = a;
-            }
-            else { // assume SIP
+                a->unserialize(*item);
+#else
+                WARN("Ignoring IAX account");
 #endif
-                a = new SIPAccount(accountid);
-                sipAccountMap[accountid] = a;
-#if HAVE_IAX
+            } else {
+                ERROR("Ignoring unknown account type \"%s\"", accountType.c_str());
             }
-#endif
-
-            a->unserialize(*item);
         }
     }