diff --git a/examples/hello/bpWriter/helloBPWriter.c b/examples/hello/bpWriter/helloBPWriter.c
index 796accca50f43d4f9f2cdf8d400a2b7b70510464..1c805a09f69a1c6b8147d0c70b2f786767cc7efe 100644
--- a/examples/hello/bpWriter/helloBPWriter.c
+++ b/examples/hello/bpWriter/helloBPWriter.c
@@ -53,6 +53,8 @@ int main(int argc, char *argv[])
     adios2_close(engineH);
     adios2_finalize(adiosH);
 
+    free(myFloats);
+
     MPI_Finalize();
 
     return 0;
diff --git a/source/adios2/core/IO.cpp b/source/adios2/core/IO.cpp
index 1dee549c8f6ae855d818460b11cb5773a24c68fe..55146f10014388db62f8cd645d0ad0effb75fe8e 100644
--- a/source/adios2/core/IO.cpp
+++ b/source/adios2/core/IO.cpp
@@ -91,7 +91,8 @@ IO::DefineVariableCompound(const std::string &name, const size_t sizeOfVariable,
 {
     if (m_DebugMode)
     {
-        if (VariableExists(name))
+        auto itVariable = m_Variables.find(name);
+        if (!IsEnd(itVariable, m_Variables))
         {
             throw std::invalid_argument("ERROR: variable " + name +
                                         " exists in IO object " + m_Name +
diff --git a/source/adios2/core/IO.h b/source/adios2/core/IO.h
index f0a7b453633131f6077cf03b79505c7112e1dd65..01c7ad427c0da0a38c6f94273a2f1cb446b503e0 100644
--- a/source/adios2/core/IO.h
+++ b/source/adios2/core/IO.h
@@ -140,7 +140,7 @@ public:
     template <class T>
     Variable<T> &DefineVariable(const std::string &name, const Dims &shape = {},
                                 const Dims &start = {}, const Dims &count = {},
-                                const bool constantShape = false);
+                                const bool constantDims = false);
 
     /**
      * Define a Variable of primitive data type for I/O.
@@ -159,8 +159,8 @@ public:
                                              const Dims &shape = Dims{},
                                              const Dims &start = Dims{},
                                              const Dims &count = Dims{},
-                                             const bool constantShape = false);
-  
+                                             const bool constantDims = false);
+
     VariableCompound &DefineVariableCompound(const std::string &name,
                                              const size_t sizeOfVariable,
                                              const Dims &shape = Dims{},
diff --git a/source/adios2/core/IO.tcc b/source/adios2/core/IO.tcc
index eb11fc87444b1b788368990f6da0faa35146b7d3..c73ed1ce75b6c96f82f6f064b7267187339a71b3 100644
--- a/source/adios2/core/IO.tcc
+++ b/source/adios2/core/IO.tcc
@@ -28,7 +28,7 @@ namespace adios2
 template <class T>
 Variable<T> &IO::DefineVariable(const std::string &name, const Dims &shape,
                                 const Dims &start, const Dims &count,
-                                const bool constantShape)
+                                const bool constantDims)
 {
     if (m_DebugMode)
     {
diff --git a/source/adios2/core/Variable.tcc b/source/adios2/core/Variable.tcc
index d6241f856adfd5512ea87ec53cc392e6f5d2a5f9..0de077a2e58fc3dd66314eca48143213f82c335d 100644
--- a/source/adios2/core/Variable.tcc
+++ b/source/adios2/core/Variable.tcc
@@ -24,7 +24,7 @@ namespace adios2
     template <>                                                                \
     Variable<T>::Variable(const std::string &name, const Dims &shape,          \
                           const Dims &start, const Dims &count,                \
-                          const bool constantShape, const bool debugMode)      \
+                          const bool constantDims, const bool debugMode)       \
     : VariableBase(name, GetType<T>(), sizeof(T), shape, start, count,         \
                    constantDims, debugMode)                                    \
     {                                                                          \