diff --git a/sflphone-gtk/configure.ac b/sflphone-gtk/configure.ac
index 6fce5b4c1b7934ce09fd9d62236b39eaa9252def..4aed9cef8df605855fcdda077e07300cfcd55af9 100644
--- a/sflphone-gtk/configure.ac
+++ b/sflphone-gtk/configure.ac
@@ -15,7 +15,7 @@ AC_ARG_WITH(debug,
 		[with_debug=no]
 	)
 if test "x$with_debug" = "xfull" -o "x$with_debug" = "xyes"; then
-	CFLAGS="$CFLAGS -g -DDEBUG -Wall -Wextra"
+	CFLAGS="$CFLAGS -g -O2 -DDEBUG -Wall -Wextra"
 else
 	CFLAGS="$CFLAGS -g -Wall -O2"
 fi
diff --git a/sflphone-gtk/src/configwindow.c b/sflphone-gtk/src/configwindow.c
index a15290e3bfa511942377ca14416d7bd5397fe148..7e079995bf0a62beb6497f11b5d13ccad0b3a1e8 100644
--- a/sflphone-gtk/src/configwindow.c
+++ b/sflphone-gtk/src/configwindow.c
@@ -184,8 +184,9 @@ clean_history( void )
 select_account(GtkTreeSelection *selection, GtkTreeModel *model)
 {
     GtkTreeIter iter;
-    GValue val = {0};
+    GValue val;
 
+    memset (&val, 0, sizeof(val));
     if (!gtk_tree_selection_get_selected(selection, &model, &iter))
     {
         selectedAccount = NULL;
diff --git a/sflphone-gtk/src/historyfilter.c b/sflphone-gtk/src/historyfilter.c
index b7d5ebc21b8ae1788bf167890aaf5ebb5a0ad8cc..db1d405246aa83a8dd83ea1d07a243c898763d64 100644
--- a/sflphone-gtk/src/historyfilter.c
+++ b/sflphone-gtk/src/historyfilter.c
@@ -17,6 +17,8 @@
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#include <string.h>
+
 #include <historyfilter.h>
 #include <calltree.h>
 
@@ -35,9 +37,11 @@ is_visible(GtkTreeModel* model, GtkTreeIter* iter, gpointer data UNUSED)
 {
   if( SHOW_SEARCHBAR )
   {
-	GValue val = {0,};
+	GValue val;
+
 	gchar* text = NULL;
 	gchar* search = (gchar*)gtk_entry_get_text(GTK_ENTRY(filter_entry));
+    memset (&val, 0, sizeof(val));
 	gtk_tree_model_get_value(GTK_TREE_MODEL(model), iter, 1, &val);
 	if(G_VALUE_HOLDS_STRING(&val)){
 		text = (gchar *)g_value_get_string(&val);
@@ -45,6 +49,7 @@ is_visible(GtkTreeModel* model, GtkTreeIter* iter, gpointer data UNUSED)
 	if(text != NULL && g_ascii_strncasecmp(search, _("Search"), 6) != 0){
 		return g_regex_match_simple(search, text, G_REGEX_CASELESS, 0);
  	}
+    g_value_unset (&val);
 	return TRUE;
   }
   return TRUE;