diff --git a/doc/API_design/API_example_use.cpp b/doc/API_design/API_example_use.cpp
index 04b198466866cc18ce8e59a36e0cbed8a9918587..ce85124cb4e26cbe9444e1e3a3e61fdb27d2ff2e 100644
--- a/doc/API_design/API_example_use.cpp
+++ b/doc/API_design/API_example_use.cpp
@@ -92,7 +92,7 @@ int main( int argc, char* argv[])
         // Engine will copy this bounding box from the data pointer into the buffer. Size of the bounding box should match the
         // "space" selection which was given above. Default memspace is the full selection.
         adios::Selection memspace = adios.SelectionBoundingBox( {1,NX}, {0,1} ); // local dims and offsets; both as list
-        var2D.SetMemorySelection( sel );
+        var2D.SetMemorySelection( memspace );
 
         writer->Write<double>( var2D, *Temperature );