diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 8eda73b..8b025da 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -2314,11 +2314,8 @@ empathy_accounts_dialog_show_application (GdkScreen *screen,
 
   if (selected_account != NULL)
     {
-      const gchar *account_path;
-
-      account_path = tp_proxy_get_object_path (TP_PROXY (selected_account));
       account_option = g_strdup_printf ("--select-account=%s",
-          &account_path[strlen (TP_ACCOUNT_OBJECT_PATH_BASE)]);
+          tp_account_get_path_suffix (selected_account));
 
       argv[i++] = account_option;
     }
diff --git a/src/empathy-accounts.c b/src/empathy-accounts.c
index 6d0561b..05cb269 100644
--- a/src/empathy-accounts.c
+++ b/src/empathy-accounts.c
@@ -93,7 +93,6 @@ account_manager_ready_for_accounts_cb (GObject *source_object,
     gpointer user_data)
 {
   TpAccountManager *manager = TP_ACCOUNT_MANAGER (source_object);
-  const gchar *account_id = (const gchar*) user_data;
   GError *error = NULL;
 
   if (!tp_account_manager_prepare_finish (manager, result, &error))
@@ -103,7 +102,9 @@ account_manager_ready_for_accounts_cb (GObject *source_object,
       return;
     }
 
-  if (account_id != NULL)
+  account_manager_prepared = TRUE;
+
+  if (selected_account_name != NULL)
     {
       gchar *account_path;
       TpAccount *account = NULL;
@@ -112,7 +113,7 @@ account_manager_ready_for_accounts_cb (GObject *source_object,
       /* create and prep the corresponding TpAccount so it's fully ready by the
        * time we try to select it in the accounts dialog */
       account_path = g_strdup_printf ("%s%s", TP_ACCOUNT_OBJECT_PATH_BASE,
-          account_id);
+          selected_account_name);
       bus = tp_dbus_daemon_dup (NULL);
       if ((account = tp_account_new (bus, account_path, &error)))
         {
@@ -124,6 +125,8 @@ account_manager_ready_for_accounts_cb (GObject *source_object,
           DEBUG ("Failed to find account with path %s: %s", account_path,
               error->message);
           g_clear_error (&error);
+
+          maybe_show_accounts_ui (manager);
         }
 
       g_object_unref (bus);
@@ -132,7 +135,6 @@ account_manager_ready_for_accounts_cb (GObject *source_object,
   else
     {
       maybe_show_accounts_ui (manager);
-      account_manager_prepared = TRUE;
     }
 }
 
@@ -140,13 +142,8 @@ static int
 app_command_line_cb (GApplication *app,
     GApplicationCommandLine *cmdline)
 {
-  gchar **argv;
-  gint argc;
-
   g_application_hold (app);
 
-  argv = g_application_command_line_get_arguments (cmdline, &argc);
-
   /* if the window is ready, present it; otherwise, it will be presented when
    * the accounts manager is prepared */
   if (account_manager_prepared)
@@ -160,8 +157,6 @@ app_command_line_cb (GApplication *app,
       g_object_unref (account_manager);
     }
 
-  g_strfreev (argv);
-
   return 0;
 }
 
@@ -247,7 +242,7 @@ main (int argc, char *argv[])
   account_manager = tp_account_manager_dup ();
 
   tp_account_manager_prepare_async (account_manager, NULL,
-    account_manager_ready_for_accounts_cb, selected_account_name);
+    account_manager_ready_for_accounts_cb, NULL);
 
   g_signal_connect (app, "command-line", G_CALLBACK (app_command_line_cb),
       NULL);
