diff --git a/sflphone-client-gnome/src/accountlist.c b/sflphone-client-gnome/src/accountlist.c
index 8a4187df746b60a0cc3f7f0223b20a1cf48d5e35..bd8621c6949230ee0534ba3f6a8f2ef9e1ef530b 100644
--- a/sflphone-client-gnome/src/accountlist.c
+++ b/sflphone-client-gnome/src/accountlist.c
@@ -298,9 +298,13 @@ gchar * account_list_get_ordered_list (void) {
     gchar *order="";
     guint i;
 
-    for( i=0; i<account_list_get_size(); i++ )
+    for( i=0; i < account_list_get_size(); i++ )
     {
-        order = g_strconcat (order, account_list_get_nth (i)->accountID, "/", NULL);
+        account_t * account = NULL;
+        account = account_list_get_nth(i);    
+        if (account != NULL) {
+            order = g_strconcat (order, account->accountID, "/", NULL);
+        }
     }
     return order;
 }
diff --git a/sflphone-client-gnome/src/config/accountwindow.c b/sflphone-client-gnome/src/config/accountwindow.c
index c34b0cc4e9934fa55d86b27e6cb2ab6462577d2c..455b43aa117b978e1416a1246064d9741322cb40 100644
--- a/sflphone-client-gnome/src/config/accountwindow.c
+++ b/sflphone-client-gnome/src/config/accountwindow.c
@@ -57,7 +57,7 @@ GtkWidget * entryHostname;
 GtkWidget * entryPassword;
 GtkWidget * entryMailbox;
 GtkWidget * entryResolveNameOnlyOnce;
-GtkWidget * entryExpire;
+GtkWidget * expireSpinBox;
 GtkListStore * credentialStore;
 GtkWidget * deleteCredButton;
 GtkWidget * treeViewCredential;
@@ -693,14 +693,14 @@ GtkWidget * create_advanced_tab(account_t **a)
     gtk_box_pack_start(GTK_BOX(ret), frame, FALSE, FALSE, 0);
 	gtk_container_set_border_width (GTK_CONTAINER(table), 10);
 	gtk_table_set_row_spacings( GTK_TABLE(table), 5);	
-	
-	label = gtk_label_new_with_mnemonic (_("Registration _expire"));
-	gtk_table_attach_defaults( GTK_TABLE( table ), label, 0, 1, 0, 1);
-	gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
-	entryExpire = gtk_entry_new();
-	gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryExpire);
-	gtk_entry_set_text(GTK_ENTRY(entryExpire), account_expire);
-	gtk_table_attach_defaults( GTK_TABLE( table ), entryExpire, 1, 2, 0, 1);
+
+	label = gtk_label_new_with_mnemonic (_("Local port"));
+	gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 0, 1);
+	gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
+    expireSpinBox = gtk_spin_button_new_with_range(1, 65535, 1);
+	gtk_label_set_mnemonic_widget(GTK_LABEL(label), expireSpinBox);
+    gtk_spin_button_set_value(GTK_SPIN_BUTTON(expireSpinBox), g_ascii_strtod(account_expire, NULL));
+	gtk_table_attach_defaults(GTK_TABLE(table), expireSpinBox, 1, 2, 0, 1);
 
 	entryResolveNameOnlyOnce = gtk_check_button_new_with_mnemonic(_("_Comply with RFC 3263"));
 	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(entryResolveNameOnlyOnce),
@@ -961,7 +961,7 @@ show_account_window (account_t * a)
 				g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryMailbox))));
 		g_hash_table_replace(currentAccount->properties,
 				g_strdup(ACCOUNT_REGISTRATION_EXPIRE),
-				g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryExpire))));				
+				g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(expireSpinBox))));				
         
 		if (strcmp(proto, "SIP") == 0) {
 			guint i, size;
diff --git a/sflphone-common/src/sip/sipvoiplink.cpp b/sflphone-common/src/sip/sipvoiplink.cpp
index 755585d251f2820372d87ee9fa212f5bb775a805..b6fe24488354dad0154bc90bb35b2a93305324de 100644
--- a/sflphone-common/src/sip/sipvoiplink.cpp
+++ b/sflphone-common/src/sip/sipvoiplink.cpp
@@ -2329,8 +2329,8 @@ void call_on_state_changed (pjsip_inv_session *inv, pjsip_event *e)
         if (link)
             link->SIPCallAnswered (call, rdata);
     } else if (inv->state == PJSIP_INV_STATE_DISCONNECTED) {
-        _debug ("Invitation falled in state \"disconnected\".\n");
-        _debug ("State: %i, Disconnection cause: %i\n", inv->state, inv->cause);
+    
+        _debug ("State: %s. Cause: %.*s\n", invitationStateMap[inv->state], (int)inv->cause_text.slen, inv->cause_text.ptr);
 
         switch (inv->cause) {
                 /* The call terminates normally - BYE / CANCEL */
@@ -2343,11 +2343,8 @@ void call_on_state_changed (pjsip_inv_session *inv, pjsip_event *e)
                 if (link) {
                     link->SIPCallClosed (call);
                 }
-
                 break;
-
-                /* The call connection failed */
-
+                
             case PJSIP_SC_NOT_FOUND:            /* peer not found */
             case PJSIP_SC_DECLINE:
             case PJSIP_SC_REQUEST_TIMEOUT:      /* request timeout */
diff --git a/sflphone-common/src/sip/sipvoiplink.h b/sflphone-common/src/sip/sipvoiplink.h
index 723d3240d7bd8d5ca53e96b710db8d23d41162ca..65e91ec3a37b7dfd4618b7ed16196b84544e2a07 100644
--- a/sflphone-common/src/sip/sipvoiplink.h
+++ b/sflphone-common/src/sip/sipvoiplink.h
@@ -48,7 +48,7 @@ namespace sfl {
 #define RANDOM_SIP_PORT   rand() % 64000 + 1024
 
 // To set the verbosity. From 0 (min) to 6 (max)
-#define PJ_LOG_LEVEL 6 
+#define PJ_LOG_LEVEL 0 
 
 /**
  * @file sipvoiplink.h