diff --git a/include/core/frame/frame_base.h b/include/core/frame/frame_base.h
index fe2b7164d4613bc698c4589283a827b2b1b38283..cb1f99ce9b03c4b490148ff7de93394cd4c66d21 100644
--- a/include/core/frame/frame_base.h
+++ b/include/core/frame/frame_base.h
@@ -296,7 +296,7 @@ inline std::shared_ptr<const C> FrameBase::getCaptureOfType() const
     {
         auto cap_derived = std::dynamic_pointer_cast<C>(capture_ptr);
         if (cap_derived)
-            return capture_ptr;
+            return cap_derived;
     }
     return nullptr;
 }
@@ -308,7 +308,7 @@ inline std::shared_ptr<C> FrameBase::getCaptureOfType()
     {
         auto cap_derived = std::dynamic_pointer_cast<C>(capture_ptr);
         if (cap_derived)
-            return capture_ptr;
+            return cap_derived;
     }
     return nullptr;
 }
@@ -321,7 +321,7 @@ inline std::list<std::shared_ptr<const C>> FrameBase::getCapturesOfType() const
     {
         auto cap_derived = std::dynamic_pointer_cast<C>(capture_ptr);
         if (cap_derived)
-            captures.push_back(capture_ptr);
+            captures.push_back(cap_derived);
     }
     return captures;
 }
@@ -334,7 +334,7 @@ inline std::list<std::shared_ptr<C>> FrameBase::getCapturesOfType()
     {
         auto cap_derived = std::dynamic_pointer_cast<C>(capture_ptr);
         if (cap_derived)
-            captures.push_back(capture_ptr);
+            captures.push_back(cap_derived);
     }
     return captures;
 }