diff --git a/src/gui/xic_view/xicwindow.cpp b/src/gui/xic_view/xicwindow.cpp
index 3c0fe147eb828edda6efa05741a9b4adf5fa9d1c..1a4046aaaf6686ae48573d555cc8b4da0abcc5b8 100644
--- a/src/gui/xic_view/xicwindow.cpp
+++ b/src/gui/xic_view/xicwindow.cpp
@@ -46,10 +46,10 @@ XicWindow::XicWindow(ProjectWindow *parent):
     ui->xic_precision->setPrecision(pappso::Precision::fromString(precision_str));
 
     _detect_zivy.setSmoothingHalfEdgeWindows(settings.value("xic/zivy_smoothing", "1").toInt());
-    _detect_zivy.setMinMaxHalfEdgeWindows(settings.value("xic/zivy_minmax_half_window", "3").toInt());
+    _detect_zivy.setMinMaxHalfEdgeWindows(settings.value("xic/zivy_minmax_half_window", "4").toInt());
     _detect_zivy.setMaxMinHalfEdgeWindows(settings.value("xic/zivy_maxmin_half_window", "2").toInt());
-    _detect_zivy.setDetectionThresholdOnMinmax(settings.value("xic/zivy_minmax_threshold", "5000").toDouble());
-    _detect_zivy.setDetectionThresholdOnMaxmin(settings.value("xic/zivy_maxmin_threshold", "3000").toDouble());
+    _detect_zivy.setDetectionThresholdOnMinmax(settings.value("xic/zivy_minmax_threshold", "50000").toDouble());
+    _detect_zivy.setDetectionThresholdOnMaxmin(settings.value("xic/zivy_maxmin_threshold", "30000").toDouble());
 
 
 #if QT_VERSION >= 0x050000
diff --git a/src/utils/msrunstore.cpp b/src/utils/msrunstore.cpp
index 28d16448672101efa3605b1a4874395cdea3788e..677efe12ecb773b02384ce9a5ae7b510c4fc3aec 100644
--- a/src/utils/msrunstore.cpp
+++ b/src/utils/msrunstore.cpp
@@ -43,25 +43,25 @@ MsRunStore::~MsRunStore()
 }
 
 MsRunSp MsRunStore::getInstance(const MsRun * p_msrun) {
-    MsRunSp p_xtfile;
-    for (auto & msrun_pair :_map_msrun) {
-        if (msrun_pair.second.get() == p_msrun) {
-            return msrun_pair.second;
-        }
+    auto it = std::find_if(_map_msrun.begin(), _map_msrun.end(), [p_msrun] (const MsRunSp & msrun_sp) {return msrun_sp.get()== p_msrun;});
+    if (it != _map_msrun.end()) {
+        return (*it);
     }
+    MsRunSp p_xtfile;
     return p_xtfile;
 }
 
 MsRunSp MsRunStore::getInstance(const QString & location) {
 
-    std::map< QString, MsRunSp >::iterator it = _map_msrun.find(location);
+    auto it = std::find_if(_map_msrun.begin(), _map_msrun.end(), [location] (const MsRunSp & msrun_sp) {return msrun_sp.get()->getFilename()==location;});
     if (it != _map_msrun.end()) {
-        return it->second;
+        return *it;
     }
     else {
         MsRunSp p_xtfile = std::make_shared<MsRun>(location);
-        p_xtfile.get()->setXmlId(QString("samp%1").arg(pappso::Utils::getLexicalOrderedString(_map_msrun.size())));
-        _map_msrun.insert(std::pair< QString, MsRunSp >(location, p_xtfile));
+        p_xtfile.get()->setXmlId(QString("msrun%1").arg(pappso::Utils::getLexicalOrderedString(_map_msrun.size()+1)));
+        p_xtfile.get()->setFilename(location);
+        _map_msrun.push_back( p_xtfile);
         return p_xtfile;
 
     }
@@ -69,10 +69,10 @@ MsRunSp MsRunStore::getInstance(const QString & location) {
 }
 
 
-std::vector<MsRunSp> MsRunStore::getMsRunList() const {
-    std::vector<MsRunSp> msrun_list;
-    for (auto & msrun_pair :_map_msrun) {
-        msrun_list.push_back(msrun_pair.second);
-    }
-    return msrun_list;
+const std::vector<MsRunSp> & MsRunStore::getMsRunList() const {
+    //std::vector<MsRunSp> msrun_list;
+   // for (auto & msrun_pair :_map_msrun) {
+   //     msrun_list.push_back(msrun_pair.second);
+   // }
+    return _map_msrun;
 }
diff --git a/src/utils/msrunstore.h b/src/utils/msrunstore.h
index 69585f0992e27e70e6fcfc7362b667c23c24962e..48391de8c890b8e26df4b6aa47a20bacc7900526 100644
--- a/src/utils/msrunstore.h
+++ b/src/utils/msrunstore.h
@@ -45,9 +45,9 @@ public:
     MsRunSp getInstance(const QString & location);
     MsRunSp getInstance(const MsRun * p_msrun);
     
-    std::vector<MsRunSp> getMsRunList() const;
+    const std::vector<MsRunSp> & getMsRunList() const;
 private:
-    std::map<QString, MsRunSp> _map_msrun;
+    std::vector<MsRunSp> _map_msrun;
 };
 
 #endif // MSRUNSTORE_H