diff --git a/sflphone-client-gnome/src/contacts/calltab.c b/sflphone-client-gnome/src/contacts/calltab.c
index 40a9571bfa7c986ce6d4934a4e963d1ca8fa7311..f2b333a3ece50e069c1b0744e088f21905a50ccf 100644
--- a/sflphone-client-gnome/src/contacts/calltab.c
+++ b/sflphone-client-gnome/src/contacts/calltab.c
@@ -94,10 +94,13 @@ calltab_get_selected_conf ()
 void
 calltab_create_searchbar (calltab_t* tab)
 {
-    if (g_strcasecmp (tab->_name, HISTORY) == 0)
+    if (g_strcasecmp (tab->_name, HISTORY) == 0) {
         tab->searchbar = history_searchbar_new ();
-    else if (g_strcasecmp (tab->_name, CONTACTS) == 0)
+    }
+    else if (g_strcasecmp (tab->_name, CONTACTS) == 0) {
         tab->searchbar = contacts_searchbar_new ();
-    else
+    }
+    else {
         ERROR ("Current calls tab does not need a searchbar\n");
+    }
 }
diff --git a/sflphone-client-gnome/src/contacts/calltree.c b/sflphone-client-gnome/src/contacts/calltree.c
index 4f7bae859e09c0d06779ad61bec678b38fc342c9..47cda43ce9c32b70a8557b7044841df6891f3b11 100644
--- a/sflphone-client-gnome/src/contacts/calltree.c
+++ b/sflphone-client-gnome/src/contacts/calltree.c
@@ -645,7 +645,9 @@ calltree_create (calltab_t* tab, gboolean searchbar_type)
     // search bar if tab is either "history" or "addressbook"
     if (searchbar_type) {
         calltab_create_searchbar (tab);
-        gtk_box_pack_start (GTK_BOX (tab->tree), tab->searchbar, FALSE, TRUE, 0);
+        if(tab->searchbar != NULL) {
+            gtk_box_pack_start (GTK_BOX (tab->tree), tab->searchbar, FALSE, TRUE, 0);
+    	}
     }
 
     gtk_widget_show (tab->tree);
diff --git a/sflphone-client-gnome/src/contacts/searchbar.c b/sflphone-client-gnome/src/contacts/searchbar.c
index 3392223e2628f0c25d79f3da2fa1261abf983535..02f65cfb624a7e392025cfae5eac48034733c74d 100644
--- a/sflphone-client-gnome/src/contacts/searchbar.c
+++ b/sflphone-client-gnome/src/contacts/searchbar.c
@@ -161,8 +161,6 @@ void update_searchbar_addressbook_list()
         }
     }
 
-    DEBUG("OK");
-
     if(abookfactory_is_addressbook_loaded()) {
         AddrBookFactory *factory = abookfactory_get_factory();
         if (activeIsSet) {
@@ -175,7 +173,6 @@ void update_searchbar_addressbook_list()
             factory->addrbook->set_current_book(gtk_combo_box_get_active_text(GTK_COMBO_BOX(cbox)));
         }
     }
-    DEBUG("OK");
 
     g_free (activeText);
     cboxSignalId = gtk_signal_connect (GTK_OBJECT (cbox), "changed", G_CALLBACK (cbox_changed_cb), NULL);
@@ -440,13 +437,13 @@ GtkWidget* contacts_searchbar_new ()
     book_list = dbus_get_addressbook_list();
 
     AddrBookFactory *factory = abookfactory_get_factory();
-
+    
     factory->addrbook->init(book_list);
 
     GSList *book_list_iterator;
     book_data_t *book_data;
     GSList *books_data = factory->addrbook->get_books_data(book_list);
-
+    
     // Populate menu
     count = 0;
     gboolean activeIsSet = FALSE;
@@ -496,7 +493,6 @@ GtkWidget* contacts_searchbar_new ()
     gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (cbox), cell, "text", 0, NULL);
 
 
-
 #if GTK_CHECK_VERSION(2,16,0)
 
     // GdkPixbuf *pixbuf;