diff --git a/sflphone-gtk/src/accountlist.c b/sflphone-gtk/src/accountlist.c
index a075d5799041cb9e60932ccf1d88aab4bef86608..bbf398b190c36a14dd128e66c7fde6f413c5104c 100644
--- a/sflphone-gtk/src/accountlist.c
+++ b/sflphone-gtk/src/accountlist.c
@@ -138,6 +138,7 @@ account_list_get_current( )
 void
 account_list_set_current_id(const gchar * accountID)
 {
+  g_print("set current id = %d\n" , accountID);
   __CURRENT_ACCOUNT_ID = g_strdup(accountID);
 }
 
@@ -208,3 +209,17 @@ account_list_move_down(guint index)
 	}
 	account_list_set_current_pos( 0 );
 }
+
+guint
+account_list_get_registered_accounts( void )
+{
+  guint res = 0;
+  int i;
+  for(i=0;i<account_list_get_size();i++)
+  {
+    if( account_list_get_nth( i ) -> state == ( ACCOUNT_STATE_REGISTERED ))
+      res ++;
+  }
+  g_print(" %d registered accounts \n" , res );
+  return res;
+}
diff --git a/sflphone-gtk/src/accountlist.h b/sflphone-gtk/src/accountlist.h
index e71ec3d9b9631eac945087188a73ee62ca11e6a5..70756bfad130458da41f4cfdad4917f3b65daf52 100644
--- a/sflphone-gtk/src/accountlist.h
+++ b/sflphone-gtk/src/accountlist.h
@@ -94,6 +94,11 @@ void account_list_remove (const gchar * accountID);
  */
 account_t * account_list_get_by_state ( account_state_t state);
 
+/**
+ * @return guint The number of registered accounts in the list
+ */
+guint account_list_get_registered_accounts( );
+
 /** 
  * Return the number of accounts in the list
  * @return guint The number of accounts in the list 
diff --git a/sflphone-gtk/src/accountwindow.c b/sflphone-gtk/src/accountwindow.c
index 73edaac47ad7782b2faa164f50b17cca00cee807..87767fd4a75f3db2a3aee1f9042f7a6536da6b57 100644
--- a/sflphone-gtk/src/accountwindow.c
+++ b/sflphone-gtk/src/accountwindow.c
@@ -388,9 +388,11 @@ show_account_window (account_t * a)
     /** @todo Verify if it's the best condition to check */
     if (currentAccount->accountID == NULL) {
       dbus_add_account(currentAccount);
+      account_list_set_current_id( currentAccount->accountID);
     }
     else {
       dbus_set_account_details(currentAccount);
+      account_list_set_current_id( currentAccount->accountID);
     }
   }
   gtk_widget_destroy (GTK_WIDGET(dialog));
diff --git a/sflphone-gtk/src/calltree.c b/sflphone-gtk/src/calltree.c
index 2b02150fb3f4ca819f7a063a2bba3385feb3dba1..bc7e82f95a34ce1f7c37e736c006807a1e68e1bc 100644
--- a/sflphone-gtk/src/calltree.c
+++ b/sflphone-gtk/src/calltree.c
@@ -164,9 +164,8 @@ call_mailbox( GtkWidget* widget , gpointer data )
     mailboxCall->callID = g_new0(gchar, 30);
     g_sprintf(mailboxCall->callID, "%d", rand());
     //mailboxCall->to = g_strdup(current->mailbox_number);
-    mailboxCall->to = g_strdup("888");
+    mailboxCall->to = g_strdup(g_hash_table_lookup(current->properties, ACCOUNT_MAILBOX));
     mailboxCall->accountID = g_strdup(current->accountID);
-    printf("call : from : %s to %s\n", mailboxCall->from, mailboxCall->to);
     call_list_add( current_calls , mailboxCall );
     update_call_tree_add( current_calls , mailboxCall );    
     update_menus();
@@ -181,6 +180,7 @@ toolbar_update_buttons ()
 	gtk_widget_set_sensitive( GTK_WIDGET(hangupButton),     FALSE);
 	gtk_widget_set_sensitive( GTK_WIDGET(holdButton),       FALSE);
 	gtk_widget_set_sensitive( GTK_WIDGET(transfertButton),  FALSE);
+	gtk_widget_set_sensitive( GTK_WIDGET(mailboxButton) , TRUE );
 	gtk_widget_set_sensitive( GTK_WIDGET(unholdButton),     FALSE);
 	g_object_ref(holdButton);
 	g_object_ref(unholdButton);
@@ -262,6 +262,7 @@ toolbar_update_buttons ()
 		else
 		{
 			gtk_widget_set_sensitive( GTK_WIDGET(callButton), FALSE);
+			gtk_widget_set_sensitive( GTK_WIDGET(mailboxButton), FALSE);
 		}
 	}
 }
@@ -388,11 +389,10 @@ create_toolbar (){
 	history_shown = FALSE;
 	active_calltree = current_calls;
 
-	//image = gtk_image_new_from_file( ICONS_DIR "/stock_mail-unread.svg");
 	mailboxButton = gtk_toggle_tool_button_new_from_stock( GTK_STOCK_HOME );
-	//gtk_tool_button_set_icon_widget(GTK_TOOL_BUTTON(mailboxButton), image);
+	if( account_list_get_size() ==0 ) gtk_widget_set_state( GTK_WIDGET(mailboxButton), GTK_STATE_INSENSITIVE );
         gtk_widget_set_tooltip_text(GTK_WIDGET(mailboxButton), _("Mail Box"));
-        gtk_tool_button_set_label(GTK_TOOL_BUTTON(transfertButton), _("Mail Box"));
+        gtk_tool_button_set_label(GTK_TOOL_BUTTON(mailboxButton), _("Mail Box"));
         g_signal_connect (G_OBJECT (mailboxButton), "toggled",
                         G_CALLBACK (call_mailbox), NULL);
         gtk_toolbar_insert(GTK_TOOLBAR(ret), GTK_TOOL_ITEM(mailboxButton), -1);
diff --git a/sflphone-gtk/src/configwindow.c b/sflphone-gtk/src/configwindow.c
index 13de7c809986bdb170a13a4ff9102bc9420b91aa..06713faf1af24efc312a022b7843f18fe7313195 100644
--- a/sflphone-gtk/src/configwindow.c
+++ b/sflphone-gtk/src/configwindow.c
@@ -1371,5 +1371,8 @@ show_accounts_window( void )
 
       dialogOpen=FALSE;
       gtk_widget_destroy(GTK_WIDGET(dialog));
+      if( account_list_get_size() >0 && account_list_get_current()==NULL ) 
+	account_list_set_current_pos(0);
+      toolbar_update_buttons();
 }