diff --git a/src/post_treatments/aevol_post_neutral_mut_acc.cpp b/src/post_treatments/aevol_post_neutral_mut_acc.cpp
index 733db30537b1fcb23bc23d59abe6f8e046a8b445..c1d56df3944c209cc6eb123427964194461d9511 100644
--- a/src/post_treatments/aevol_post_neutral_mut_acc.cpp
+++ b/src/post_treatments/aevol_post_neutral_mut_acc.cpp
@@ -113,7 +113,9 @@ int main(int argc, char ** argv) {
   std::cout << " - output file = " << outputFile << std::endl;
   IOJson inputJson(inputFile);
 
-  out::init("result.txt", "mutation.txt");
+  std::string result = "result_seed_" + std::to_string(seed_prng) + ".txt";
+  std::string mutation = "mutation_seed_" + std::to_string(seed_prng) + ".csv";
+  out::init(result.c_str(), mutation.c_str());
 
   auto mut_prng   = std::make_shared<JumpingMT>(seed_prng);
   auto stoch_prng = std::make_shared<JumpingMT>(seed_prng);
diff --git a/src/post_treatments/libaevol_post/neutral_mutation_exp.cpp b/src/post_treatments/libaevol_post/neutral_mutation_exp.cpp
index 41342e30d5d1296c1bb9c3a08b718714ae205d82..50e468bd443a687a8dced6351f6905ff31f64766 100644
--- a/src/post_treatments/libaevol_post/neutral_mutation_exp.cpp
+++ b/src/post_treatments/libaevol_post/neutral_mutation_exp.cpp
@@ -135,7 +135,7 @@ Individual *neutral_mutation_closer_to(Individual *individual, int32_t size_want
       child->clear_everything_except_dna_and_promoters();
       child->compute_phenotype();
       if (individual->phenotype()->is_identical_to(*child->phenotype(), 0) &&
-          std::abs(size_wanted - individual->amount_of_dna()) >
+          std::abs(size_wanted - individual->amount_of_dna()) >=
               std::abs(size_wanted - child->amount_of_dna())) {
         break;
       } else {
diff --git a/src/post_treatments/libaevol_post/neutral_mutation_output.cpp b/src/post_treatments/libaevol_post/neutral_mutation_output.cpp
index 8ead90126048aa8c5e1908ac0b70112515177e39..c5999e5e4b66837619535acb77aad419f66e158e 100644
--- a/src/post_treatments/libaevol_post/neutral_mutation_output.cpp
+++ b/src/post_treatments/libaevol_post/neutral_mutation_output.cpp
@@ -105,12 +105,12 @@ int32_t mutation_event_invert(MutationEvent &mutationEvent) {
 int32_t mutation_event_length_mutation(MutationEvent &mutationEvent,
                                        unsigned int size) {
   if (mutationEvent.type() == MutationEventType::DELETION
-      || mutationEvent.type() == MutationEventType::DUPLICATION) {
-    if (mutationEvent.pos_2() > mutationEvent.pos_1()) {
-      return mutationEvent.pos_2() - mutationEvent.pos_1();
-    } else {
-      return mutationEvent.pos_1() + size - mutationEvent.pos_2();
-    }
+      || mutationEvent.type() == MutationEventType::DUPLICATION
+      || mutationEvent.type() == MutationEventType::INVERSION
+      || mutationEvent.type() == MutationEventType::TRANSLOCATION){
+    int intern_mut_size = std::max(mutationEvent.pos_1()-mutationEvent.pos_2() , mutationEvent.pos_2()-mutationEvent.pos_1()); //length of the segment that do not cover the origin
+    int extern_mut_size = size - std::max(mutationEvent.pos_1(),mutationEvent.pos_2()) + std::min(mutationEvent.pos_1(),mutationEvent.pos_2()); //length of the segment covering the origin
+    return std::min(intern_mut_size, extern_mut_size);
   } else {
     if (mutationEvent.type() == MutationEventType::SMALL_INSERTION
         || mutationEvent.type() == MutationEventType::SMALL_DELETION) {