diff --git a/src/common/Session.cpp b/src/common/Session.cpp
index e827d15dbb59eda5f1a2b23a1005c7eeb85a2c7d..8037d29afd2597efea634e0dd826466b50d71112 100644
--- a/src/common/Session.cpp
+++ b/src/common/Session.cpp
@@ -300,7 +300,7 @@ Palette *Session::get_palette(const std::string &type, const std::string &palett
         where_from = &_palettes_event;
     }
 
-    if(!p || p->get_name() != palette_name) {
+    if((!p || p->get_name() != palette_name) && where_from != NULL) {
         delete p;
 
         QMap <QString, QVariant> qmap = S->value(QString::fromStdString(type+"/"+palette_name+"/map")).toMap();
diff --git a/src/interface/Node_select.cpp b/src/interface/Node_select.cpp
index afeaf7a5109e62d5e1ccf391c5a763dfda589457..3c3972a4615b33ecc066799862523655f99d010a 100644
--- a/src/interface/Node_select.cpp
+++ b/src/interface/Node_select.cpp
@@ -166,7 +166,7 @@ void Node_select::set_container_names_rec(QTreeWidgetItem *current_node, Contain
     if(load_view==true) {
         children = current_container->get_view_children();
     }
-    if(load_view==false || children->empty()) {
+    else if(load_view==false) {
         children = current_container->get_children();
     }
     //QFlags<Qt::ItemFlag>     flg= Qt::ItemIsDragEnabled;
diff --git a/src/parser/PajeParser/ParserDefinitionPaje.cpp b/src/parser/PajeParser/ParserDefinitionPaje.cpp
index 53f6921146f86dd7c0817819abaa8650a78da516..63da0f0baedfa9f7879df557a109f30ab081c824 100644
--- a/src/parser/PajeParser/ParserDefinitionPaje.cpp
+++ b/src/parser/PajeParser/ParserDefinitionPaje.cpp
@@ -90,6 +90,7 @@ int                        ParserDefinitionPaje::_nbparsers   = 0;
 ParserDefinitionPaje::ParserDefinitionPaje() {
     int i;
 
+    _nbFieldNames = FIELDNAME_SIZE;
     _state = _OUT_A_DEFINITION;
     _defid = 0;
     _nbparsers++;
@@ -127,7 +128,6 @@ ParserDefinitionPaje::ParserDefinitionPaje() {
         INSERT_FNAME(Line,                _FieldType_Int | _FieldType_String );
 
         // Initialize the map between the field names and the associated id
-        _nbFieldNames = FIELDNAME_SIZE;
         for(i=0; i<FIELDNAME_SIZE; i++) {
             _FNameStr2Id.insert(pair<string, int>(_FieldNames[i]._name, i));
         }
diff --git a/src/plugin/Plugin.hpp b/src/plugin/Plugin.hpp
index cad33759aa499ba27b8eebe6d2f93433a82138e4..8c014497f1ca8fe4c36d6e2afabca23a8ac9cf04 100644
--- a/src/plugin/Plugin.hpp
+++ b/src/plugin/Plugin.hpp
@@ -63,7 +63,7 @@ public:
      * \fn Plugin(QWidget *parent = 0)
      * \brief Default constructor
      */
-    Plugin(QWidget *parent = nullptr) : QWidget(parent){}
+    Plugin(QWidget *parent = nullptr) : QWidget(parent), _trace(nullptr){}
     /*!
      * \fn init()
      * \brief Initialize the plugin
diff --git a/src/render/GanttDiagram.hpp b/src/render/GanttDiagram.hpp
index 156b9f74b0c74c19b6be6eae17efc469c16f05bf..b60dd70355ffc3b995c07e5fcc3b04a6d3b4d7d3 100644
--- a/src/render/GanttDiagram.hpp
+++ b/src/render/GanttDiagram.hpp
@@ -114,6 +114,7 @@ public:
      */
     GanttDiagram( Render *instance ) {
         _render = instance;
+        _start_new_line = false;
     }
 
     /*!
diff --git a/src/render/Geometry.cpp b/src/render/Geometry.cpp
index 008dacd180df6f85682b84710ac46f1b7324d719..4b92efb642bf89bac423bbfef93d352617ec8d5a 100644
--- a/src/render/Geometry.cpp
+++ b/src/render/Geometry.cpp
@@ -73,15 +73,16 @@ Geometry::Geometry(){
 
     /* Camera is placed on (0,0,0) and looks to (0,0,-1) */
 
-    _z_ruler_over      = -0.4;
     _z_ruler           = -0.5;
+    _z_ruler_over      = -0.4;
     _z_ruler_under     = -0.6;
     _z_container       = -1.0;
     _z_container_under = -1.2;
-    _z_arrow           = -3.0;/* closer to camera than containers or states (MUST be negative)*/
+    _z_state           = -5.0;
     _z_event           = -2.0;/* closer to camera than containers or states (MUST be negative)*/
+    _z_arrow           = -3.0;/* closer to camera than containers or states (MUST be negative)*/
     _z_counter         = -4.0;
-    _z_state           = -5.0;
+    _ruler_distance    = 0.0;
 }
 
 
diff --git a/src/trace/Entity.cpp b/src/trace/Entity.cpp
index d7dbb753491ab7f56c5f6b97195c850e20177446..dfce49ae6495a91496dc65a969d5ba3b89832970 100644
--- a/src/trace/Entity.cpp
+++ b/src/trace/Entity.cpp
@@ -55,6 +55,7 @@
 using namespace std;
 
 Entity::Entity(Container *container, map<std::string, Value *> opt): _container(container)/*, _extra_fields(opt)*/ {
+    _container = nullptr;
     if(opt.empty()) {
         _extra_fields=nullptr;
     }
diff --git a/src/trace/Trace.cpp b/src/trace/Trace.cpp
index 300de08676e50a7f4bdb0fc62b5b35db9d3d0dee..59c919b93d89bcaed29af214c518cda4b9c3caaf 100644
--- a/src/trace/Trace.cpp
+++ b/src/trace/Trace.cpp
@@ -415,7 +415,7 @@ Trace::start_link(Date &time, LinkType *type,
     EntityValue *EV = search_entity_value( type->get_alias(), type );
     assert(EV);
 
-    if (ancestor && type && source)
+    if (ancestor && source)
         ancestor->start_link(time, type, source, EV, key, opt);
 
     if (time > _max_date)