diff --git a/Core/StandardSamples/FunctionalTestRegistry.cpp b/Core/StandardSamples/FunctionalTestRegistry.cpp
index 260709b55dfdb542755e818249e0b2992cd1be2b..9857af0a27b5704bc03d3404c11ae50a0eb090c7 100644
--- a/Core/StandardSamples/FunctionalTestRegistry.cpp
+++ b/Core/StandardSamples/FunctionalTestRegistry.cpp
@@ -267,6 +267,14 @@ FunctionalTestRegistry::FunctionalTestRegistry()
         "None",
         1e-10);
 
+    add("SimulationWithMasks",
+        "Various masks are added to the simulation",
+        "GISASWithMasks",
+        "CylindersAndPrismsBuilder",
+        "None",
+        1e-10);
+
+
 }
 
 void FunctionalTestRegistry::add(const std::string &test_name,
diff --git a/Core/StandardSamples/SimulationRegistry.cpp b/Core/StandardSamples/SimulationRegistry.cpp
index 6c885b065c72fb0f988dbc5ebcd6cf62a9ee9295..0b99e00d34fa53a29568ac885efb4df228da4ec9 100644
--- a/Core/StandardSamples/SimulationRegistry.cpp
+++ b/Core/StandardSamples/SimulationRegistry.cpp
@@ -35,7 +35,7 @@ SimulationRegistry::SimulationRegistry()
                  "GISAS simulation with small detector and detector resolution");
 
 
-    registerItem("MiniGISASWithMasks", StandardSimulations::MiniGISASWithMasks,
+    registerItem("GISASWithMasks", StandardSimulations::GISASWithMasks,
                  "GISAS simulation with small detector and various masks");
 
     registerItem("MaxiGISAS", StandardSimulations::MaxiGISAS,
diff --git a/Core/StandardSamples/StandardSimulations.cpp b/Core/StandardSamples/StandardSimulations.cpp
index 4dcd4537380e1f3f322264846b2e7563f8df3c4a..108083cb1e8754bc2a95728740b546b95950fdb3 100644
--- a/Core/StandardSamples/StandardSimulations.cpp
+++ b/Core/StandardSamples/StandardSimulations.cpp
@@ -97,7 +97,7 @@ GISASSimulation *StandardSimulations::MiniGISASBeamDivergence()
     return result;
 }
 
-GISASSimulation *StandardSimulations::MiniGISASWithMasks()
+GISASSimulation *StandardSimulations::GISASWithMasks()
 {
     GISASSimulation *result = new GISASSimulation();
     result->setDetectorParameters(100, -1.0*Units::degree, 1.0*Units::degree,
@@ -112,19 +112,19 @@ GISASSimulation *StandardSimulations::MiniGISASWithMasks()
     result->addMask(Geometry::Ellipse(0.0*deg, 1.0*deg, 0.5*deg, 0.5*deg), false);
     result->addMask(Geometry::Ellipse(0.11*deg, 1.25*deg, 0.05*deg, 0.05*deg), true);
 
-    std::vector<std::vector<double> >  points = {
-        {0.0*deg, 1.0*deg}, {0.5*deg, 1.2*deg}, {0.5*deg, 0.8*deg}, {0.0*deg, 1.0*deg}
-    };
-    result->addMask(Geometry::Polygon(points), true);
+//    std::vector<std::vector<double> >  points = {
+//        {0.0*deg, 1.0*deg}, {0.5*deg, 1.2*deg}, {0.5*deg, 0.8*deg}, {0.0*deg, 1.0*deg}
+//    };
+//    result->addMask(Geometry::Polygon(points), true);
 
-    result->addMask(Geometry::Rectangle(0.45*deg, 0.95*deg, 0.55*deg, 1.05*deg), false);
-    result->addMask(Geometry::Rectangle(0.61*deg, 0.95*deg, 0.71*deg, 1.05*deg), false);
-    result->addMask(Geometry::Rectangle(0.75*deg, 0.95*deg, 0.85*deg, 1.05*deg), false);
+//    result->addMask(Geometry::Rectangle(0.45*deg, 0.95*deg, 0.55*deg, 1.05*deg), false);
+//    result->addMask(Geometry::Rectangle(0.61*deg, 0.95*deg, 0.71*deg, 1.05*deg), false);
+//    result->addMask(Geometry::Rectangle(0.75*deg, 0.95*deg, 0.85*deg, 1.05*deg), false);
 
-    // more stuff
-    result->addMask(Geometry::Ellipse(-0.5*deg, 1.5*deg, 0.3*deg, 0.1*deg, 45.*deg), false);
-    result->addMask(Geometry::VerticalLine(-0.6*deg), true);
-    result->addMask(Geometry::HorizontalLine(0.3*deg), false);
+//    // more masks
+//    result->addMask(Geometry::Ellipse(-0.5*deg, 1.5*deg, 0.3*deg, 0.1*deg, 45.*deg), false);
+//    result->addMask(Geometry::VerticalLine(-0.6*deg), true);
+//    result->addMask(Geometry::HorizontalLine(0.3*deg), false);
 
 
     return result;
diff --git a/Core/StandardSamples/StandardSimulations.h b/Core/StandardSamples/StandardSimulations.h
index fcef03ab1cb8021d910f956092676d7310d5800d..8bfe428181054b0535ae4d82085cde59cc5bc2e4 100644
--- a/Core/StandardSamples/StandardSimulations.h
+++ b/Core/StandardSamples/StandardSimulations.h
@@ -31,7 +31,7 @@ GISASSimulation *BasicGISAS00();
 GISASSimulation *MiniGISAS();
 GISASSimulation *MiniGISASBeamDivergence();
 GISASSimulation *MiniGISASDetectorResolution();
-GISASSimulation *MiniGISASWithMasks();
+GISASSimulation *GISASWithMasks();
 GISASSimulation *MaxiGISAS();
 GISASSimulation *MaxiGISAS00();
 GISASSimulation *IsGISAXSSimulation1();
diff --git a/Core/Tools/src/PyGenTools.cpp b/Core/Tools/src/PyGenTools.cpp
index a9427aceb4d5646bf5bf97dc6673a38fc5b0ef4f..3d3115e71efaa350042fdd52b0e80e3b4661c136 100644
--- a/Core/Tools/src/PyGenTools.cpp
+++ b/Core/Tools/src/PyGenTools.cpp
@@ -61,9 +61,9 @@ std::string PyGenTools::printBool(double value)
 {
     std::ostringstream inter;
     if(value) {
-        inter << "true";
+        inter << "True";
     } else {
-        inter << "false";
+        inter << "False";
     }
     return inter.str();
 }
diff --git a/Core/Tools/src/PyGenVisitor.cpp b/Core/Tools/src/PyGenVisitor.cpp
index 177d7de37252e21cf2e01696c949ec716d94c0e1..e4266aecd7c28753a66500cef026a813381ae605 100644
--- a/Core/Tools/src/PyGenVisitor.cpp
+++ b/Core/Tools/src/PyGenVisitor.cpp
@@ -1341,11 +1341,10 @@ std::string PyGenVisitor::defineMasks(const GISASSimulation *simulation) const
         result << "\n";
         for(size_t i_mask=0; i_mask<detectorMask->getNumberOfMasks(); ++i_mask) {
             bool mask_value(false);
-//            result << indent() << "simulation.addMask(";
             const Geometry::IShape2D *shape = detectorMask->getMaskShape(i_mask, mask_value);
-//            result << indent() << PyGenTools::getRepresentation(shape);
             result << PyGenTools::getRepresentation(indent(), shape, mask_value);
         }
+        result << "\n";
     }
 
     return result.str();
diff --git a/Tests/FunctionalTests/TestGUI/CMakeLists.txt b/Tests/FunctionalTests/TestGUI/CMakeLists.txt
index 7d119e1cd12a8669eca216842be94b4e58b1740d..b4c507f274473f94c519dae157161758c75d8ba7 100644
--- a/Tests/FunctionalTests/TestGUI/CMakeLists.txt
+++ b/Tests/FunctionalTests/TestGUI/CMakeLists.txt
@@ -54,6 +54,7 @@ set(list_of_tests
     "GUISuite/BoxCompositionRotateZ"
     "GUISuite/BoxCompositionRotateZandY"
     "GUISuite/BoxStackComposition"
+    "GUISuite/SimulationWithMasks"
 )
 
 # Adding executables.
diff --git a/Tests/FunctionalTests/TestPyCore/CMakeLists.txt b/Tests/FunctionalTests/TestPyCore/CMakeLists.txt
index 6f2005ed371a4c9881c3106b890fa416a9d0c769..ce8be3cb5686299a991926555e5f1a7a89d17dcd 100644
--- a/Tests/FunctionalTests/TestPyCore/CMakeLists.txt
+++ b/Tests/FunctionalTests/TestPyCore/CMakeLists.txt
@@ -97,6 +97,7 @@ set(list_of_tests
     "PySuite/BoxCompositionRotateZ"
     "PySuite/BoxCompositionRotateZandY"
     "PySuite/BoxStackComposition"
+    "PySuite/SimulationWithMasks"
 )
 
 # Adding executables.