diff --git a/src/Services/TimeBasedSchedulingService.cpp b/src/Services/TimeBasedSchedulingService.cpp
index e7605dde947b6293439cd53fc91990bcdafc12ac..3bf160c9ce68bc5895a5fad1e3939475e8d741d0 100644
--- a/src/Services/TimeBasedSchedulingService.cpp
+++ b/src/Services/TimeBasedSchedulingService.cpp
@@ -52,9 +52,7 @@ void TimeBasedSchedulingService::insertActivities(Message &request) {
 
 		uint32_t releaseTime = request.readUint32(); // Get the specified release time
 		if ((currentNumberOfActivities >= ECSS_MAX_NUMBER_OF_TIME_SCHED_ACTIVITIES) ||
-		    (releaseTime <
-		     (currentTime +
-		      ECSS_TIME_MARGIN_FOR_ACTIVATION))) {
+		    (releaseTime < (currentTime + ECSS_TIME_MARGIN_FOR_ACTIVATION))) {
 			// todo: Send a failed start of execution
 			request.readPosition += ECSS_TC_REQUEST_STRING_SIZE;
 		} else {
diff --git a/src/main.cpp b/src/main.cpp
index ea2a99af0ce752e6fdf312071f2970f1ce3505fb..6ad84701428536b05caed06b8a94408eb22d604e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -8,9 +8,9 @@
 #include "Services/EventReportService.hpp"
 #include "Services/TimeManagementService.hpp"
 #include "Services/EventActionService.hpp"
+#include "Services/TimeBasedSchedulingService.hpp"
 #include "Message.hpp"
 #include "MessageParser.hpp"
-#include "Services/MemoryManagementService.hpp"
 #include "Helpers/CRCHelper.hpp"
 #include "ErrorHandler.hpp"
 #include "etl/String.hpp"
@@ -286,5 +286,40 @@ int main() {
 		.eventActionDefinitionArray[0].empty);
 
 
+	/* ST[11] test
+	TimeBasedSchedulingService timeBasedSchedulingService;
+	MessageParser msgParser;
+	auto currentTime = static_cast<uint32_t >(time(nullptr)); // Get the current system time
+	std::cout << "\n\nST[11] service is running";
+	std::cout << "\nCurrent time in seconds (UNIX epoch): " << currentTime << std::endl;
+
+	Message receivedMsg = Message(11, 1, Message::TC, 1);
+	Message testMessage1(6, 5, Message::TC, 1), testMessage2(4, 5, Message::TC, 1);
+	testMessage1.appendUint16(4253); // Append dummy data
+	testMessage2.appendUint16(45667); // Append dummy data
+
+	timeBasedSchedulingService.enableScheduleExecution(receivedMsg); // Enable the schedule
+
+	// Insert activities in the schedule
+	receivedMsg = Message(11, 4, Message::TC, 1);
+	receivedMessage.appendUint16(2); // Total number of requests
+
+	receivedMsg.appendUint32(currentTime + 1556435);
+	receivedMsg.appendString(msgParser.convertTCToStr(testMessage1));
+
+	receivedMsg.appendUint32(currentTime + 1957232);
+	receivedMsg.appendString(msgParser.convertTCToStr(testMessage2));
+	timeBasedSchedulingService.insertActivities(receivedMsg);
+
+	// Time shift activities
+	receivedMsg = Message(11, 15, Message::TC, 1);
+	receivedMsg.appendSint32(-6789);
+	timeBasedSchedulingService.timeShiftAllActivities(receivedMsg);
+	std::cout << "Activities should be time shifted by: " << -6789 << " seconds." << std::endl;
+
+	// Report the activities
+	receivedMsg = Message(11, 16, Message::TC, 1);
+	timeBasedSchedulingService.detailReportAllActivities(receivedMsg);*/
+
 	return 0;
 }
diff --git a/test/Services/TimeBasedSchedulingService.cpp b/test/Services/TimeBasedSchedulingService.cpp
index c7529fad468aa182a5459090361bde1e94945f44..9a50132e193a5390406a22e66c865fab5d5283b4 100644
--- a/test/Services/TimeBasedSchedulingService.cpp
+++ b/test/Services/TimeBasedSchedulingService.cpp
@@ -31,18 +31,14 @@ auto currentTime = static_cast<uint32_t >(time(nullptr)); // Get the current sys
 
 
 TEST_CASE("TC(11,1) Enable Schedule Execution", "[service][st11]") {
-	Message receivedMessage;
-	receivedMessage.serviceType = 11;
-	receivedMessage.messageType = 1;
+	Message receivedMessage(11, 1, Message::TC, 1);
 
 	timeSchedulingService.enableScheduleExecution(receivedMessage);
 	CHECK(unit_test::Tester::executionFunctionStatus(timeSchedulingService));
 }
 
 TEST_CASE("TC(11,2) Disable Schedule Execution", "[service][st11]") {
-	Message receivedMessage;
-	receivedMessage.serviceType = 11;
-	receivedMessage.messageType = 2;
+	Message receivedMessage(11, 2, Message::TC, 1);
 
 	timeSchedulingService.disableScheduleExecution(receivedMessage);
 	CHECK(not unit_test::Tester::executionFunctionStatus(timeSchedulingService));