diff --git a/debian/changelog b/debian/changelog
index 0efe3267c2410b0f3bccb5a9f0b640c4462d4838..1c6cfaa03d224851b64c3653ce9c8a4c7272e1c3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xtpcpp (0.1.20-2) stretch; urgency=medium
+
+  * tandem parameter form hardened
+
+ -- Olivier Langella <olivier.langella@u-psud.fr>  Sun, 15 Oct 2017 20:32:27 +0200
+
 xtpcpp (0.1.20-1) stretch; urgency=medium
 
   * tandem parameters editor
diff --git a/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.cpp b/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.cpp
index 409946ef5442f3eca82ec7db044a17bf44a6b531..88f67be1eddbf978c411ffd70873e96e7571ffd5 100644
--- a/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.cpp
+++ b/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.cpp
@@ -30,6 +30,7 @@
 #include "edittandempresetdialog.h"
 #include <QDebug>
 #include <pappsomspp/pappsoexception.h>
+#include <pappsomspp/exception/exceptionnotfound.h>
 
 #include "ui_edit_tandem_preset_dialog.h"
 #include <QSettings>
@@ -632,328 +633,336 @@ void EditTandemPresetDialog::readUi() {
 
 void EditTandemPresetDialog::populate() {
     qDebug() << "EditTandemPresetDialog::populate begin";
-    ui->method_name_line_edit->setText(_tandem_params.getMethodName());
-    /*
-     * <note type="input" label="spectrum, parent monoisotopic mass error units">ppm</note>
-     * */
-    ui->spmmeu_daltons_radio_button->setChecked(true);
-    ui->spmmeu_ppm_radio_button->setChecked(false);
-    if ( _tandem_params.getValue("spectrum, parent monoisotopic mass error units") == "ppm" ) { // -1 for not found
-        ui->spmmeu_daltons_radio_button->setChecked(false);
-        ui->spmmeu_ppm_radio_button->setChecked(true);
-    }
-    //<note type="input" label="spectrum, parent monoisotopic mass error minus">10</note>
-    ui->parent_ion_lower_window_edit->setText(_tandem_params.getValue("spectrum, parent monoisotopic mass error minus"));
-    //<note type="input" label="spectrum, parent monoisotopic mass error plus">10</note>
-    ui->parent_ion_upper_window_edit->setText(_tandem_params.getValue("spectrum, parent monoisotopic mass error plus"));
-    //<note type="input" label="spectrum, parent monoisotopic mass isotope error">yes</note>
-    ui->spmmie_yes_radio_button->setChecked(true);
-    ui->spmmie_no_radio_button->setChecked(false);
-    if ( _tandem_params.getValue("spectrum, parent monoisotopic mass isotope error") == "no" ) { // -1 for not found
-        ui->spmmie_yes_radio_button->setChecked(false);
-        ui->spmmie_no_radio_button->setChecked(true);
-    }
-    //<note type="input" label="spectrum, maximum parent charge">4</note>
-    ui->smpc_edit->setText(_tandem_params.getValue("spectrum, maximum parent charge"));
-
-    //<note type="input" label="spectrum, fragment mass type">monoisotopic</note>
-    auto index = ui->sfmt_combo_box->findText("monoisotopic");
-    if ( index != -1 ) { // -1 for not found
-        ui->sfmt_combo_box->setCurrentIndex(index);
-    }
-    //<note type="input" label="spectrum, fragment monoisotopic mass error units">Daltons</note>
-    ui->sfmmeu_daltons_radio_button->setChecked(true);
-    ui->sfmmeu_ppm_radio_button->setChecked(false);
-    if ( _tandem_params.getValue("spectrum, fragment monoisotopic mass error units") == "ppm" ) { // -1 for not found
-        ui->sfmmeu_daltons_radio_button->setChecked(false);
-        ui->sfmmeu_ppm_radio_button->setChecked(true);
-    }
-
-    //<note type="input" label="spectrum, fragment monoisotopic mass error">0.02</note>
-    ui->sfmme_edit->setText(_tandem_params.getValue("spectrum, fragment monoisotopic mass error"));
-
-
-    //<note type="input" label="spectrum, use neutral loss window">yes</note>
-    ui->sunlw_yes_radio_button->setChecked(true);
-    ui->sunlw_no_radio_button->setChecked(false);
-    if ( _tandem_params.getValue("spectrum, use neutral loss window") == "no" ) { // -1 for not found
-        ui->sunlw_yes_radio_button->setChecked(false);
-        ui->sunlw_no_radio_button->setChecked(true);
-    }
-
-    //<note type="input" label="spectrum, dynamic range">100.0</note>
-    ui->sdr_edit->setText(_tandem_params.getValue("spectrum, dynamic range"));
-
-    //<note type="input" label="spectrum, total peaks">100</note>
-    ui->stp_edit->setText(_tandem_params.getValue("spectrum, total peaks"));
-
-    ui->smp_edit->setText(_tandem_params.getValue("spectrum, minimum peaks"));
-
-
-    //<note type="input" label="spectrum, minimum fragment mz">150.0</note>
-    ui->smfmz_edit->setText(_tandem_params.getValue("spectrum, minimum fragment mz"));
-    //<note type="input" label="spectrum, minimum parent m+h">500.0</note>
-    ui->smpmh_edit->setText(_tandem_params.getValue("spectrum, minimum parent m+h"));
+    try {
+        ui->method_name_line_edit->setText(_tandem_params.getMethodName());
+        /*
+         * <note type="input" label="spectrum, parent monoisotopic mass error units">ppm</note>
+         * */
+        ui->spmmeu_daltons_radio_button->setChecked(true);
+        ui->spmmeu_ppm_radio_button->setChecked(false);
+        if ( _tandem_params.getValue("spectrum, parent monoisotopic mass error units") == "ppm" ) { // -1 for not found
+            ui->spmmeu_daltons_radio_button->setChecked(false);
+            ui->spmmeu_ppm_radio_button->setChecked(true);
+        }
+        //<note type="input" label="spectrum, parent monoisotopic mass error minus">10</note>
+        ui->parent_ion_lower_window_edit->setText(_tandem_params.getValue("spectrum, parent monoisotopic mass error minus"));
+        //<note type="input" label="spectrum, parent monoisotopic mass error plus">10</note>
+        ui->parent_ion_upper_window_edit->setText(_tandem_params.getValue("spectrum, parent monoisotopic mass error plus"));
+        //<note type="input" label="spectrum, parent monoisotopic mass isotope error">yes</note>
+        ui->spmmie_yes_radio_button->setChecked(true);
+        ui->spmmie_no_radio_button->setChecked(false);
+        if ( _tandem_params.getValue("spectrum, parent monoisotopic mass isotope error") == "no" ) { // -1 for not found
+            ui->spmmie_yes_radio_button->setChecked(false);
+            ui->spmmie_no_radio_button->setChecked(true);
+        }
+        //<note type="input" label="spectrum, maximum parent charge">4</note>
+        ui->smpc_edit->setText(_tandem_params.getValue("spectrum, maximum parent charge"));
 
-    //<note type="input" label="spectrum, sequence batch size">1000</note>
-    ui->spsbs_edit->setText(_tandem_params.getValue("spectrum, sequence batch size"));
-    //<note type="input" label="spectrum, use contrast angle">no</note>
-    ui->suca_yes_radio_button->setChecked(true);
-    ui->suca_no_radio_button->setChecked(false);
-    if ( _tandem_params.getValue("spectrum, use contrast angle") == "no" ) { // -1 for not found
-        ui->suca_yes_radio_button->setChecked(false);
-        ui->suca_no_radio_button->setChecked(true);
-    }
+        //<note type="input" label="spectrum, fragment mass type">monoisotopic</note>
+        auto index = ui->sfmt_combo_box->findText("monoisotopic");
+        if ( index != -1 ) { // -1 for not found
+            ui->sfmt_combo_box->setCurrentIndex(index);
+        }
+        //<note type="input" label="spectrum, fragment monoisotopic mass error units">Daltons</note>
+        ui->sfmmeu_daltons_radio_button->setChecked(true);
+        ui->sfmmeu_ppm_radio_button->setChecked(false);
+        if ( _tandem_params.getValue("spectrum, fragment monoisotopic mass error units") == "ppm" ) { // -1 for not found
+            ui->sfmmeu_daltons_radio_button->setChecked(false);
+            ui->sfmmeu_ppm_radio_button->setChecked(true);
+        }
 
+        //<note type="input" label="spectrum, fragment monoisotopic mass error">0.02</note>
+        ui->sfmme_edit->setText(_tandem_params.getValue("spectrum, fragment monoisotopic mass error"));
 
-    //<note type="input" label="spectrum, threads">1</note>
-    ui->st_edit->setText(_tandem_params.getValue("spectrum, threads"));
 
+        //<note type="input" label="spectrum, use neutral loss window">yes</note>
+        ui->sunlw_yes_radio_button->setChecked(true);
+        ui->sunlw_no_radio_button->setChecked(false);
+        if ( _tandem_params.getValue("spectrum, use neutral loss window") == "no" ) { // -1 for not found
+            ui->sunlw_yes_radio_button->setChecked(false);
+            ui->sunlw_no_radio_button->setChecked(true);
+        }
 
-    //<note type="input" label="protein, cleavage site">[RK]|{P}</note>
-    ui->pcs_edit->setText(_tandem_params.getValue("protein, cleavage site"));
-    //<note type="input" label="protein, cleavage semi">no</note>
-    ui->pcsemi_yes_radio_button->setChecked(true);
-    ui->pcsemi_no_radio_button->setChecked(false);
-    if ( _tandem_params.getValue("protein, cleavage semi") == "no" ) { // -1 for not found
-        ui->pcsemi_yes_radio_button->setChecked(false);
-        ui->pcsemi_no_radio_button->setChecked(true);
-    }
-
-
-    //<note type="input" label="protein, cleavage C-terminal mass change">+17.00305</note>
-    ui->pcctmc_edit->setText(_tandem_params.getValue("protein, cleavage C-terminal mass change"));
-    //<note type="input" label="protein, cleavage N-terminal mass change">+1.00794</note>
-    ui->pcntmc_edit->setText(_tandem_params.getValue("protein, cleavage N-terminal mass change"));
-
-    //<note type="input" label="protein, C-terminal residue modification mass">0.0</note>
-    ui->pctrmm_edit->setText(_tandem_params.getValue("protein, C-terminal residue modification mass"));
-    //<note type="input" label="protein, N-terminal residue modification mass">0.0</note>
-    ui->pntrmm_edit->setText(_tandem_params.getValue("protein, N-terminal residue modification mass"));
-
-    //<note type="input" label="protein, quick acetyl">yes</note>
-    ui->pqa_yes_radio_button->setChecked(true);
-    ui->pqa_no_radio_button->setChecked(false);
-    if ( _tandem_params.getValue("protein, quick acetyl") == "no" ) { // -1 for not found
-        ui->pqa_yes_radio_button->setChecked(false);
-        ui->pqa_no_radio_button->setChecked(true);
-    }
-
-    //<note type="input" label="protein, quick pyrolidone">yes</note>
-    ui->pqp_yes_radio_button->setChecked(true);
-    ui->pqp_no_radio_button->setChecked(false);
-    if ( _tandem_params.getValue("protein, quick pyrolidone") == "no" ) { // -1 for not found
-        ui->pqp_yes_radio_button->setChecked(false);
-        ui->pqp_no_radio_button->setChecked(true);
-    }
-
-
-    //<note type="input" label="protein, stP bias">yes</note>
-    ui->pstpb_yes_radio_button->setChecked(true);
-    ui->pstpb_no_radio_button->setChecked(false);
-    if ( _tandem_params.getValue("protein, stP bias") == "no" ) { // -1 for not found
-        ui->pstpb_yes_radio_button->setChecked(false);
-        ui->pstpb_no_radio_button->setChecked(true);
-    }
-
-    //<note type="input" label="protein, modified residue mass file"></note>
-    ui->pmrmf_edit->setText(_tandem_params.getValue("protein, modified residue mass file"));
-
-    //<note type="input" label="residue, modification mass">57.02146@C</note>
-    ui->rmm_edit->setText(_tandem_params.getValue("residue, modification mass"));
-
-    //<note type="input" label="residue, modification mass 1"></note>
-    ui->rmm1_edit->setText(_tandem_params.getValue("residue, modification mass 1"));
-    //<note type="input" label="residue, modification mass 2"></note>
-    ui->rmm2_edit->setText(_tandem_params.getValue("residue, modification mass 2"));
-
-
-    //<note type="input" label="residue, potential modification mass">15.99491@M</note>
-    ui->rpmm_edit->setText(_tandem_params.getValue("residue, potential modification mass"));
-    //<note type="input" label="residue, potential modification mass 1"></note>
-    ui->rpmm1_edit->setText(_tandem_params.getValue("residue, potential modification mass 1"));
-    //<note type="input" label="residue, potential modification mass 2"></note>
-    ui->rpmm2_edit->setText(_tandem_params.getValue("residue, potential modification mass 2"));
-    //<note type="input" label="residue, potential modification motif"></note>
-    ui->rpmmotif_edit->setText(_tandem_params.getValue("residue, potential modification motif"));
-    //<note type="input" label="residue, potential modification motif 1"></note>
-    ui->rpmmotif1_edit->setText(_tandem_params.getValue("residue, potential modification motif 1"));
-    //<note type="input" label="residue, potential modification motif 2"></note>
-    ui->rpmmotif2_edit->setText(_tandem_params.getValue("residue, potential modification motif 2"));
-
-    //<note type="input" label="scoring, minimum ion count">4</note>
-    ui->smic_edit->setText(_tandem_params.getValue("scoring, minimum ion count"));
-    //<note type="input" label="scoring, maximum missed cleavage sites">1</note>
-    ui->smmcs_edit->setText(_tandem_params.getValue("scoring, maximum missed cleavage sites"));
-    //<note type="input" label="scoring, cyclic permutation">yes</note>
-    ui->scp_yes_radio_button->setChecked(true);
-    ui->scp_no_radio_button->setChecked(false);
-    if ( _tandem_params.getValue("scoring, cyclic permutation") == "no" ) { // -1 for not found
-        ui->scp_yes_radio_button->setChecked(false);
-        ui->scp_no_radio_button->setChecked(true);
-    }
-    //<note type="input" label="scoring, include reverse">yes</note>
-    ui->sir_yes_radio_button->setChecked(true);
-    ui->sir_no_radio_button->setChecked(false);
-    if ( _tandem_params.getValue("scoring, include reverse") == "no" ) { // -1 for not found
-        ui->sir_yes_radio_button->setChecked(false);
-        ui->sir_no_radio_button->setChecked(true);
-    }
-    //<note type="input" label="scoring, y ions">yes</note>
-    ui->syi_yes_radio_button->setChecked(true);
-    ui->syi_no_radio_button->setChecked(false);
-    if ( _tandem_params.getValue("scoring, y ions") == "no" ) { // -1 for not found
-        ui->syi_yes_radio_button->setChecked(false);
-        ui->syi_no_radio_button->setChecked(true);
-    }
-    //<note type="input" label="scoring, b ions">yes</note>
-    ui->sbi_yes_radio_button->setChecked(true);
-    ui->sbi_no_radio_button->setChecked(false);
-    if ( _tandem_params.getValue("scoring, b ions") == "no" ) { // -1 for not found
-        ui->sbi_yes_radio_button->setChecked(false);
-        ui->sbi_no_radio_button->setChecked(true);
-    }
-    //<note type="input" label="scoring, c ions">no</note>
-    ui->sci_yes_radio_button->setChecked(true);
-    ui->sci_no_radio_button->setChecked(false);
-    if ( _tandem_params.getValue("scoring, c ions") == "no" ) { // -1 for not found
-        ui->sci_yes_radio_button->setChecked(false);
-        ui->sci_no_radio_button->setChecked(true);
-    }
-    //<note type="input" label="scoring, z ions">no</note>
-    ui->szi_yes_radio_button->setChecked(true);
-    ui->szi_no_radio_button->setChecked(false);
-    if ( _tandem_params.getValue("scoring, z ions") == "no" ) { // -1 for not found
-        ui->szi_yes_radio_button->setChecked(false);
-        ui->szi_no_radio_button->setChecked(true);
-    }
-    //<note type="input" label="scoring, a ions">no</note>
-    ui->sai_yes_radio_button->setChecked(true);
-    ui->sai_no_radio_button->setChecked(false);
-    if ( _tandem_params.getValue("scoring, a ions") == "no" ) { // -1 for not found
-        ui->sai_yes_radio_button->setChecked(false);
-        ui->sai_no_radio_button->setChecked(true);
-    }
-    //<note type="input" label="scoring, x ions">no</note>
-    ui->sxi_yes_radio_button->setChecked(true);
-    ui->sxi_no_radio_button->setChecked(false);
-    if ( _tandem_params.getValue("scoring, x ions") == "no" ) { // -1 for not found
-        ui->sxi_yes_radio_button->setChecked(false);
-        ui->sxi_no_radio_button->setChecked(true);
-    }
-
-
-    //<note type="input" label="refine">yes</note>
-    ui->refine_yes_radio_button->setChecked(true);
-    ui->refine_no_radio_button->setChecked(false);
-    if ( _tandem_params.getValue("refine") == "no" ) { // -1 for not found
-        ui->refine_yes_radio_button->setChecked(false);
-        ui->refine_no_radio_button->setChecked(true);
-    }
-    //<note type="input" label="refine, maximum valid expectation value">0.01</note>
-    ui->rmvev_edit->setText(_tandem_params.getValue("refine, maximum valid expectation value"));
-
-    //<note type="input" label="refine, potential N-terminus modifications">+42.01056@[</note>
-    ui->refpntm_edit->setText(_tandem_params.getValue("refine, potential N-terminus modifications"));
-    //<note type="input" label="refine, potential C-terminus modifications"></note>
-    ui->refpctm_edit->setText(_tandem_params.getValue("refine, potential C-terminus modifications"));
-    //<note type="input" label="refine, modification mass">57.02146@C</note>
-    ui->refmm_edit->setText(_tandem_params.getValue("refine, modification mass"));
-    //<note type="input" label="refine, modification mass 1"></note>
-    ui->refmm1_edit->setText(_tandem_params.getValue("refine, modification mass 1"));
-    //<note type="input" label="refine, modification mass 2"></note>
-    ui->refmm2_edit->setText(_tandem_params.getValue("refine, modification mass 2"));
-    //<note type="input" label="refine, potential modification mass">15.99491@M</note>
-    ui->refpmm_edit->setText(_tandem_params.getValue("refine, potential modification mass"));
-    //<note type="input" label="refine, potential modification mass 1"></note>
-    ui->refpmm1_edit->setText(_tandem_params.getValue("refine, potential modification mass 1"));
-    //<note type="input" label="refine, potential modification mass 2"></note>
-    ui->refpmm2_edit->setText(_tandem_params.getValue("refine, potential modification mass 2"));
-    //<note type="input" label="refine, potential modification motif"></note>
-    ui->refpmmotif_edit->setText(_tandem_params.getValue("refine, potential modification motif"));
-    //<note type="input" label="refine, potential modification motif 1"></note>
-    ui->refpmmotif1_edit->setText(_tandem_params.getValue("refine, potential modification motif 1"));
-    //<note type="input" label="refine, potential modification motif 2"></note>
-    ui->refpmmotif2_edit->setText(_tandem_params.getValue("refine, potential modification motif 2"));
-    //<note type="input" label="refine, use potential modifications for full refinement">yes</note>
-    ui->rupmffr_yes_radio_button->setChecked(true);
-    ui->rupmffr_no_radio_button->setChecked(false);
-    if ( _tandem_params.getValue("refine, use potential modifications for full refinement") == "no" ) { // -1 for not found
-        ui->rupmffr_yes_radio_button->setChecked(false);
-        ui->rupmffr_no_radio_button->setChecked(true);
-    }
-    //<note type="input" label="refine, cleavage semi">no</note>
-    ui->rcsemi_yes_radio_button->setChecked(true);
-    ui->rcsemi_no_radio_button->setChecked(false);
-    if ( _tandem_params.getValue("refine, cleavage semi") == "no" ) { // -1 for not found
-        ui->rcsemi_yes_radio_button->setChecked(false);
-        ui->rcsemi_no_radio_button->setChecked(true);
-    }
-    //<note type="input" label="refine, unanticipated cleavage">no</note>
-    ui->ruc_yes_radio_button->setChecked(true);
-    ui->ruc_no_radio_button->setChecked(false);
-    if ( _tandem_params.getValue("refine, unanticipated cleavage") == "no" ) { // -1 for not found
-        ui->ruc_yes_radio_button->setChecked(false);
-        ui->ruc_no_radio_button->setChecked(true);
-    }
-    //<note type="input" label="refine, spectrum synthesis">yes</note>
-    ui->rss_yes_radio_button->setChecked(true);
-    ui->rss_no_radio_button->setChecked(false);
-    if ( _tandem_params.getValue("refine, spectrum synthesis") == "no" ) { // -1 for not found
-        ui->rss_yes_radio_button->setChecked(false);
-        ui->rss_no_radio_button->setChecked(true);
-    }
-    //<note type="input" label="refine, point mutations">no</note>
-    ui->rpm_yes_radio_button->setChecked(true);
-    ui->rpm_no_radio_button->setChecked(false);
-    if ( _tandem_params.getValue("refine, point mutations") == "no" ) { // -1 for not found
-        ui->rpm_yes_radio_button->setChecked(false);
-        ui->rpm_no_radio_button->setChecked(true);
-    }
-
-
-    //<note type="input" label="output, maximum valid expectation value">0.05</note>
-    ui->omvev_edit->setText(_tandem_params.getValue("output, maximum valid expectation value"));
-    //<note type="input" label="output, maximum valid protein expectation value">0.05</note>
-    ui->omvpev_edit->setText(_tandem_params.getValue("output, maximum valid protein expectation value"));
-    //<note type="input" label="output, results">valid</note>
-    ui->oresu_all_radio_button->setChecked(false);
-    ui->oresu_valid_radio_button->setChecked(true);
-    ui->oresu_stochastic_radio_button->setChecked(false);
-    if ( _tandem_params.getValue("output, results") == "all" ) { // -1 for not found
-        ui->oresu_all_radio_button->setChecked(true);
-        ui->oresu_valid_radio_button->setChecked(false);
+        //<note type="input" label="spectrum, dynamic range">100.0</note>
+        ui->sdr_edit->setText(_tandem_params.getValue("spectrum, dynamic range"));
+
+        //<note type="input" label="spectrum, total peaks">100</note>
+        ui->stp_edit->setText(_tandem_params.getValue("spectrum, total peaks"));
+
+        ui->smp_edit->setText(_tandem_params.getValue("spectrum, minimum peaks"));
+
+
+        //<note type="input" label="spectrum, minimum fragment mz">150.0</note>
+        ui->smfmz_edit->setText(_tandem_params.getValue("spectrum, minimum fragment mz"));
+        //<note type="input" label="spectrum, minimum parent m+h">500.0</note>
+        ui->smpmh_edit->setText(_tandem_params.getValue("spectrum, minimum parent m+h"));
+
+        //<note type="input" label="spectrum, sequence batch size">1000</note>
+        ui->spsbs_edit->setText(_tandem_params.getValue("spectrum, sequence batch size"));
+        //<note type="input" label="spectrum, use contrast angle">no</note>
+        ui->suca_yes_radio_button->setChecked(true);
+        ui->suca_no_radio_button->setChecked(false);
+        if ( _tandem_params.getValue("spectrum, use contrast angle") == "no" ) { // -1 for not found
+            ui->suca_yes_radio_button->setChecked(false);
+            ui->suca_no_radio_button->setChecked(true);
+        }
+
+
+        //<note type="input" label="spectrum, threads">1</note>
+        ui->st_edit->setText(_tandem_params.getValue("spectrum, threads"));
+
+
+        //<note type="input" label="protein, cleavage site">[RK]|{P}</note>
+        ui->pcs_edit->setText(_tandem_params.getValue("protein, cleavage site"));
+        //<note type="input" label="protein, cleavage semi">no</note>
+        ui->pcsemi_yes_radio_button->setChecked(true);
+        ui->pcsemi_no_radio_button->setChecked(false);
+        if ( _tandem_params.getValue("protein, cleavage semi") == "no" ) { // -1 for not found
+            ui->pcsemi_yes_radio_button->setChecked(false);
+            ui->pcsemi_no_radio_button->setChecked(true);
+        }
+
+
+        //<note type="input" label="protein, cleavage C-terminal mass change">+17.00305</note>
+        ui->pcctmc_edit->setText(_tandem_params.getValue("protein, cleavage C-terminal mass change"));
+        //<note type="input" label="protein, cleavage N-terminal mass change">+1.00794</note>
+        ui->pcntmc_edit->setText(_tandem_params.getValue("protein, cleavage N-terminal mass change"));
+
+        //<note type="input" label="protein, C-terminal residue modification mass">0.0</note>
+        ui->pctrmm_edit->setText(_tandem_params.getValue("protein, C-terminal residue modification mass"));
+        //<note type="input" label="protein, N-terminal residue modification mass">0.0</note>
+        ui->pntrmm_edit->setText(_tandem_params.getValue("protein, N-terminal residue modification mass"));
+
+        //<note type="input" label="protein, quick acetyl">yes</note>
+        ui->pqa_yes_radio_button->setChecked(true);
+        ui->pqa_no_radio_button->setChecked(false);
+        if ( _tandem_params.getValue("protein, quick acetyl") == "no" ) { // -1 for not found
+            ui->pqa_yes_radio_button->setChecked(false);
+            ui->pqa_no_radio_button->setChecked(true);
+        }
+
+        //<note type="input" label="protein, quick pyrolidone">yes</note>
+        ui->pqp_yes_radio_button->setChecked(true);
+        ui->pqp_no_radio_button->setChecked(false);
+        if ( _tandem_params.getValue("protein, quick pyrolidone") == "no" ) { // -1 for not found
+            ui->pqp_yes_radio_button->setChecked(false);
+            ui->pqp_no_radio_button->setChecked(true);
+        }
+
+
+        //<note type="input" label="protein, stP bias">yes</note>
+        ui->pstpb_yes_radio_button->setChecked(true);
+        ui->pstpb_no_radio_button->setChecked(false);
+        if ( _tandem_params.getValue("protein, stP bias") == "no" ) { // -1 for not found
+            ui->pstpb_yes_radio_button->setChecked(false);
+            ui->pstpb_no_radio_button->setChecked(true);
+        }
+
+        //<note type="input" label="protein, modified residue mass file"></note>
+        ui->pmrmf_edit->setText(_tandem_params.getValue("protein, modified residue mass file"));
+
+        //<note type="input" label="residue, modification mass">57.02146@C</note>
+        ui->rmm_edit->setText(_tandem_params.getValue("residue, modification mass"));
+
+        //<note type="input" label="residue, modification mass 1"></note>
+        ui->rmm1_edit->setText(_tandem_params.getValue("residue, modification mass 1"));
+        //<note type="input" label="residue, modification mass 2"></note>
+        ui->rmm2_edit->setText(_tandem_params.getValue("residue, modification mass 2"));
+
+
+        //<note type="input" label="residue, potential modification mass">15.99491@M</note>
+        ui->rpmm_edit->setText(_tandem_params.getValue("residue, potential modification mass"));
+        //<note type="input" label="residue, potential modification mass 1"></note>
+        ui->rpmm1_edit->setText(_tandem_params.getValue("residue, potential modification mass 1"));
+        //<note type="input" label="residue, potential modification mass 2"></note>
+        ui->rpmm2_edit->setText(_tandem_params.getValue("residue, potential modification mass 2"));
+        //<note type="input" label="residue, potential modification motif"></note>
+        ui->rpmmotif_edit->setText(_tandem_params.getValue("residue, potential modification motif"));
+        //<note type="input" label="residue, potential modification motif 1"></note>
+        ui->rpmmotif1_edit->setText(_tandem_params.getValue("residue, potential modification motif 1"));
+        //<note type="input" label="residue, potential modification motif 2"></note>
+        ui->rpmmotif2_edit->setText(_tandem_params.getValue("residue, potential modification motif 2"));
+
+        //<note type="input" label="scoring, minimum ion count">4</note>
+        ui->smic_edit->setText(_tandem_params.getValue("scoring, minimum ion count"));
+        //<note type="input" label="scoring, maximum missed cleavage sites">1</note>
+        ui->smmcs_edit->setText(_tandem_params.getValue("scoring, maximum missed cleavage sites"));
+        //<note type="input" label="scoring, cyclic permutation">yes</note>
+        ui->scp_yes_radio_button->setChecked(true);
+        ui->scp_no_radio_button->setChecked(false);
+        if ( _tandem_params.getValue("scoring, cyclic permutation") == "no" ) { // -1 for not found
+            ui->scp_yes_radio_button->setChecked(false);
+            ui->scp_no_radio_button->setChecked(true);
+        }
+        //<note type="input" label="scoring, include reverse">yes</note>
+        ui->sir_yes_radio_button->setChecked(true);
+        ui->sir_no_radio_button->setChecked(false);
+        if ( _tandem_params.getValue("scoring, include reverse") == "no" ) { // -1 for not found
+            ui->sir_yes_radio_button->setChecked(false);
+            ui->sir_no_radio_button->setChecked(true);
+        }
+        //<note type="input" label="scoring, y ions">yes</note>
+        ui->syi_yes_radio_button->setChecked(true);
+        ui->syi_no_radio_button->setChecked(false);
+        if ( _tandem_params.getValue("scoring, y ions") == "no" ) { // -1 for not found
+            ui->syi_yes_radio_button->setChecked(false);
+            ui->syi_no_radio_button->setChecked(true);
+        }
+        //<note type="input" label="scoring, b ions">yes</note>
+        ui->sbi_yes_radio_button->setChecked(true);
+        ui->sbi_no_radio_button->setChecked(false);
+        if ( _tandem_params.getValue("scoring, b ions") == "no" ) { // -1 for not found
+            ui->sbi_yes_radio_button->setChecked(false);
+            ui->sbi_no_radio_button->setChecked(true);
+        }
+        //<note type="input" label="scoring, c ions">no</note>
+        ui->sci_yes_radio_button->setChecked(true);
+        ui->sci_no_radio_button->setChecked(false);
+        if ( _tandem_params.getValue("scoring, c ions") == "no" ) { // -1 for not found
+            ui->sci_yes_radio_button->setChecked(false);
+            ui->sci_no_radio_button->setChecked(true);
+        }
+        //<note type="input" label="scoring, z ions">no</note>
+        ui->szi_yes_radio_button->setChecked(true);
+        ui->szi_no_radio_button->setChecked(false);
+        if ( _tandem_params.getValue("scoring, z ions") == "no" ) { // -1 for not found
+            ui->szi_yes_radio_button->setChecked(false);
+            ui->szi_no_radio_button->setChecked(true);
+        }
+        //<note type="input" label="scoring, a ions">no</note>
+        ui->sai_yes_radio_button->setChecked(true);
+        ui->sai_no_radio_button->setChecked(false);
+        if ( _tandem_params.getValue("scoring, a ions") == "no" ) { // -1 for not found
+            ui->sai_yes_radio_button->setChecked(false);
+            ui->sai_no_radio_button->setChecked(true);
+        }
+        //<note type="input" label="scoring, x ions">no</note>
+        ui->sxi_yes_radio_button->setChecked(true);
+        ui->sxi_no_radio_button->setChecked(false);
+        if ( _tandem_params.getValue("scoring, x ions") == "no" ) { // -1 for not found
+            ui->sxi_yes_radio_button->setChecked(false);
+            ui->sxi_no_radio_button->setChecked(true);
+        }
+
+
+        //<note type="input" label="refine">yes</note>
+        ui->refine_yes_radio_button->setChecked(true);
+        ui->refine_no_radio_button->setChecked(false);
+        if ( _tandem_params.getValue("refine") == "no" ) { // -1 for not found
+            ui->refine_yes_radio_button->setChecked(false);
+            ui->refine_no_radio_button->setChecked(true);
+        }
+        //<note type="input" label="refine, maximum valid expectation value">0.01</note>
+        ui->rmvev_edit->setText(_tandem_params.getValue("refine, maximum valid expectation value"));
+
+        //<note type="input" label="refine, potential N-terminus modifications">+42.01056@[</note>
+        ui->refpntm_edit->setText(_tandem_params.getValue("refine, potential N-terminus modifications"));
+        //<note type="input" label="refine, potential C-terminus modifications"></note>
+        ui->refpctm_edit->setText(_tandem_params.getValue("refine, potential C-terminus modifications"));
+        //<note type="input" label="refine, modification mass">57.02146@C</note>
+        ui->refmm_edit->setText(_tandem_params.getValue("refine, modification mass"));
+        //<note type="input" label="refine, modification mass 1"></note>
+        ui->refmm1_edit->setText(_tandem_params.getValue("refine, modification mass 1"));
+        //<note type="input" label="refine, modification mass 2"></note>
+        ui->refmm2_edit->setText(_tandem_params.getValue("refine, modification mass 2"));
+        //<note type="input" label="refine, potential modification mass">15.99491@M</note>
+        ui->refpmm_edit->setText(_tandem_params.getValue("refine, potential modification mass"));
+        //<note type="input" label="refine, potential modification mass 1"></note>
+        ui->refpmm1_edit->setText(_tandem_params.getValue("refine, potential modification mass 1"));
+        //<note type="input" label="refine, potential modification mass 2"></note>
+        ui->refpmm2_edit->setText(_tandem_params.getValue("refine, potential modification mass 2"));
+        //<note type="input" label="refine, potential modification motif"></note>
+        ui->refpmmotif_edit->setText(_tandem_params.getValue("refine, potential modification motif"));
+        //<note type="input" label="refine, potential modification motif 1"></note>
+        ui->refpmmotif1_edit->setText(_tandem_params.getValue("refine, potential modification motif 1"));
+        //<note type="input" label="refine, potential modification motif 2"></note>
+        ui->refpmmotif2_edit->setText(_tandem_params.getValue("refine, potential modification motif 2"));
+        //<note type="input" label="refine, use potential modifications for full refinement">yes</note>
+        ui->rupmffr_yes_radio_button->setChecked(true);
+        ui->rupmffr_no_radio_button->setChecked(false);
+        if ( _tandem_params.getValue("refine, use potential modifications for full refinement") == "no" ) { // -1 for not found
+            ui->rupmffr_yes_radio_button->setChecked(false);
+            ui->rupmffr_no_radio_button->setChecked(true);
+        }
+        //<note type="input" label="refine, cleavage semi">no</note>
+        ui->rcsemi_yes_radio_button->setChecked(true);
+        ui->rcsemi_no_radio_button->setChecked(false);
+        if ( _tandem_params.getValue("refine, cleavage semi") == "no" ) { // -1 for not found
+            ui->rcsemi_yes_radio_button->setChecked(false);
+            ui->rcsemi_no_radio_button->setChecked(true);
+        }
+        //<note type="input" label="refine, unanticipated cleavage">no</note>
+        ui->ruc_yes_radio_button->setChecked(true);
+        ui->ruc_no_radio_button->setChecked(false);
+        if ( _tandem_params.getValue("refine, unanticipated cleavage") == "no" ) { // -1 for not found
+            ui->ruc_yes_radio_button->setChecked(false);
+            ui->ruc_no_radio_button->setChecked(true);
+        }
+        //<note type="input" label="refine, spectrum synthesis">yes</note>
+        ui->rss_yes_radio_button->setChecked(true);
+        ui->rss_no_radio_button->setChecked(false);
+        if ( _tandem_params.getValue("refine, spectrum synthesis") == "no" ) { // -1 for not found
+            ui->rss_yes_radio_button->setChecked(false);
+            ui->rss_no_radio_button->setChecked(true);
+        }
+        //<note type="input" label="refine, point mutations">no</note>
+        ui->rpm_yes_radio_button->setChecked(true);
+        ui->rpm_no_radio_button->setChecked(false);
+        if ( _tandem_params.getValue("refine, point mutations") == "no" ) { // -1 for not found
+            ui->rpm_yes_radio_button->setChecked(false);
+            ui->rpm_no_radio_button->setChecked(true);
+        }
+
+
+        //<note type="input" label="output, maximum valid expectation value">0.05</note>
+        ui->omvev_edit->setText(_tandem_params.getValue("output, maximum valid expectation value"));
+        //<note type="input" label="output, maximum valid protein expectation value">0.05</note>
+        ui->omvpev_edit->setText(_tandem_params.getValue("output, maximum valid protein expectation value"));
+        //<note type="input" label="output, results">valid</note>
+        ui->oresu_all_radio_button->setChecked(false);
+        ui->oresu_valid_radio_button->setChecked(true);
         ui->oresu_stochastic_radio_button->setChecked(false);
+        if ( _tandem_params.getValue("output, results") == "all" ) { // -1 for not found
+            ui->oresu_all_radio_button->setChecked(true);
+            ui->oresu_valid_radio_button->setChecked(false);
+            ui->oresu_stochastic_radio_button->setChecked(false);
+        }
+        if ( _tandem_params.getValue("output, results") == "stochastic" ) { // -1 for not found
+            ui->oresu_all_radio_button->setChecked(false);
+            ui->oresu_valid_radio_button->setChecked(false);
+            ui->oresu_stochastic_radio_button->setChecked(true);
+        }
+        //<note type="input" label="output, sort results by">spectrum</note>
+        //<note type="input" label="output, proteins">yes</note>
+        //<note type="input" label="output, sequences">yes</note>
+        //<note type="input" label="output, one sequence copy">yes</note>
+        //<note type="input" label="output, spectra">yes</note>
+        ui->ospec_yes_radio_button->setChecked(true);
+        ui->ospec_no_radio_button->setChecked(false);
+        if ( _tandem_params.getValue("output, spectra") == "no" ) { // -1 for not found
+            ui->ospec_yes_radio_button->setChecked(false);
+            ui->ospec_no_radio_button->setChecked(true);
+        }
+        //<note type="input" label="output, parameters">yes</note>
+        //<note type="input" label="output, performance">yes</note>
+        //<note type="input" label="output, histograms">yes</note>
+        //<note type="input" label="output, histogram column width">30</note>
+        //<note type="input" label="output, path hashing">no</note>
+        //<note type="input" label="output, xsl path">tandem-style.xsl</note>
+        ui->oxp_edit->setText(_tandem_params.getValue("output, xsl path"));
+        //<note type="input" label="output, mzid">no</note>
+        ui->mzid_yes_radio_button->setChecked(true);
+        ui->mzid_no_radio_button->setChecked(false);
+        if ( _tandem_params.getValue("output, mzid") == "no" ) { // -1 for not found
+            ui->mzid_yes_radio_button->setChecked(false);
+            ui->mzid_no_radio_button->setChecked(true);
+        }
+    }
+    catch (pappso::ExceptionNotFound & error) {
+        QMessageBox::warning(this,tr("Parameter not found :"), error.qwhat());
     }
-    if ( _tandem_params.getValue("output, results") == "stochastic" ) { // -1 for not found
-        ui->oresu_all_radio_button->setChecked(false);
-        ui->oresu_valid_radio_button->setChecked(false);
-        ui->oresu_stochastic_radio_button->setChecked(true);
-    }
-    //<note type="input" label="output, sort results by">spectrum</note>
-    //<note type="input" label="output, proteins">yes</note>
-    //<note type="input" label="output, sequences">yes</note>
-    //<note type="input" label="output, one sequence copy">yes</note>
-    //<note type="input" label="output, spectra">yes</note>
-    ui->ospec_yes_radio_button->setChecked(true);
-    ui->ospec_no_radio_button->setChecked(false);
-    if ( _tandem_params.getValue("output, spectra") == "no" ) { // -1 for not found
-        ui->ospec_yes_radio_button->setChecked(false);
-        ui->ospec_no_radio_button->setChecked(true);
-    }
-    //<note type="input" label="output, parameters">yes</note>
-    //<note type="input" label="output, performance">yes</note>
-    //<note type="input" label="output, histograms">yes</note>
-    //<note type="input" label="output, histogram column width">30</note>
-    //<note type="input" label="output, path hashing">no</note>
-    //<note type="input" label="output, xsl path">tandem-style.xsl</note>
-    ui->oxp_edit->setText(_tandem_params.getValue("output, xsl path"));
-    //<note type="input" label="output, mzid">no</note>
-    ui->mzid_yes_radio_button->setChecked(true);
-    ui->mzid_no_radio_button->setChecked(false);
-    if ( _tandem_params.getValue("output, mzid") == "no" ) { // -1 for not found
-        ui->mzid_yes_radio_button->setChecked(false);
-        ui->mzid_no_radio_button->setChecked(true);
+    catch (pappso::PappsoException & error) {
+        QMessageBox::warning(this,tr("Error in parameters :"), error.qwhat());
     }
     qDebug() << "EditTandemPresetDialog::populate end";
 }
diff --git a/src/input/xtandemparamsaxhandler.cpp b/src/input/xtandemparamsaxhandler.cpp
index 0b8f60096f8cb530e56705d308a8a89240d2652e..f68fbabce17faca23748727c04b91ac806336f58 100644
--- a/src/input/xtandemparamsaxhandler.cpp
+++ b/src/input/xtandemparamsaxhandler.cpp
@@ -33,6 +33,11 @@
 
 XtandemParamSaxHandler::XtandemParamSaxHandler(TandemParameters * p_tandem_parameters) {
     _p_tandem_parameters = p_tandem_parameters;
+
+    //<note type="input" label="output, xsl path">tandem-style.xsl</note>
+    _p_tandem_parameters->setParamLabelValue("output, xsl path", "tandem-style.xsl");
+    //<note type="input" label="output, mzid">no</note>
+    _p_tandem_parameters->setParamLabelValue("output, mzid", "no");
 }
 XtandemParamSaxHandler::~XtandemParamSaxHandler() {
 }
@@ -140,8 +145,8 @@ bool XtandemParamSaxHandler::startElement_note(QXmlAttributes attributes) {
     if (attributes.value("type") == "input") {
         _current_label = attributes.value("label");
     }
-    
-  //  qDebug() << "XtandemParamSaxHandler::startElement_note _current_label " << _current_label;
+
+    //  qDebug() << "XtandemParamSaxHandler::startElement_note _current_label " << _current_label;
     return true;
 
 }