diff --git a/src/capture/capture_motion.cpp b/src/capture/capture_motion.cpp
index 16a535dc987deea66756f4c8468ac3005f2b3573..b87e4fb10c37d79ede036e72983faea5d7d12b7c 100644
--- a/src/capture/capture_motion.cpp
+++ b/src/capture/capture_motion.cpp
@@ -49,7 +49,7 @@ CaptureMotion::~CaptureMotion()
 
 bool CaptureMotion::containsTimeStamp (const TimeStamp& _ts, double _time_tolerance)
 {
-    assert(_ts.ok());
+    assert(_ts.ok() and this->time_stamp_.ok());
 
     // the same capture is within tolerance
     if (this->time_stamp_ - _time_tolerance <= _ts && _ts <= this->time_stamp_ + _time_tolerance)
diff --git a/src/processor/processor_motion.cpp b/src/processor/processor_motion.cpp
index 7af87c9ac5bc1ab2e81b8e8259ef140d9f7695a0..9b7f8da44e1e58c86277a2cb689401426932c723 100644
--- a/src/processor/processor_motion.cpp
+++ b/src/processor/processor_motion.cpp
@@ -896,6 +896,7 @@ CaptureMotionPtr ProcessorMotion::findCaptureContainingTimeStamp(const TimeStamp
         capture = frame->getCaptureOf(sensor);
         if (capture != nullptr)
         {
+            assert(std::dynamic_pointer_cast<CaptureMotion>(capture) != nullptr);
             // Rule 1 satisfied! We found a Capture belonging to this processor's Sensor ==> it is a CaptureMotion
             capture_motion = std::static_pointer_cast<CaptureMotion>(capture);