diff --git a/test/common/generalproblem/generallensproblem.hh b/test/common/generalproblem/generallensproblem.hh
index 8d48c9370f17d971c38f448c52a15ea892ad1eb9..7bbc220d8a24fa377a7ffaa3d9fcc3b64ad72831 100644
--- a/test/common/generalproblem/generallensproblem.hh
+++ b/test/common/generalproblem/generallensproblem.hh
@@ -195,8 +195,6 @@ class GeneralLensProblem : public GET_PROP_TYPE(TypeTag, ProblemBaseClass)
     typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
     typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes;
     typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager;
-    typedef typename GET_PROP(TypeTag, ParameterTree) ParameterTree;
-
     typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
     typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition;
 
@@ -249,17 +247,10 @@ public:
      *
      * This is used as a prefix for files generated by the simulation.
      */
-    const char *name() const
+    const std::string name() const
     {
-        if (ParameterTree::tree().hasKey("Problem.OutputfileName"))
-        {
-            std::string fileName(GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, std::string, Problem, OutputfileName));
-            return fileName.c_str();
-        }
-        else
-        {
-            return "test_generalproblem2p";
-        }
+        try { return GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, std::string, Problem, OutputfileName); }
+        catch (...) { return "test_generalproblem2p"; }
     }
 
     /*!