diff --git a/container-tag.yaml b/container-tag.yaml
index 0da006d..331240f 100644
--- a/container-tag.yaml
+++ b/container-tag.yaml
@@ -2,4 +2,4 @@
 # By default this file is in the docker build directory,
 # but the location can configured in the JJB template.
 ---
-tag: "0.4.1-1"
+tag: "0.4.2"
diff --git a/pkg/control/ut_ctrl_submgr_test.go b/pkg/control/ut_ctrl_submgr_test.go
index 45147c8..85cbe8f 100644
--- a/pkg/control/ut_ctrl_submgr_test.go
+++ b/pkg/control/ut_ctrl_submgr_test.go
@@ -59,6 +59,27 @@
 	return false
 }
 
+func (mc *testingSubmgrControl) get_registry_next_subid(t *testing.T) uint32 {
+	mc.c.registry.mutex.Lock()
+	defer mc.c.registry.mutex.Unlock()
+	return mc.c.registry.subIds[0]
+}
+
+func (mc *testingSubmgrControl) wait_registry_next_subid_change(t *testing.T, origSubId uint32, secs int) (uint32, bool) {
+	i := 1
+	for ; i <= secs*2; i++ {
+		mc.c.registry.mutex.Lock()
+		currSubId := mc.c.registry.subIds[0]
+		mc.c.registry.mutex.Unlock()
+		if currSubId != origSubId {
+			return currSubId, true
+		}
+		time.Sleep(500 * time.Millisecond)
+	}
+	mc.TestError(t, "(submgr) no subId change within %d secs", secs)
+	return 0, false
+}
+
 func (mc *testingSubmgrControl) wait_subs_clean(t *testing.T, e2SubsId uint32, secs int) bool {
 	var subs *Subscription
 	i := 1
@@ -99,27 +120,38 @@
 	return false
 }
 
-func (mc *testingSubmgrControl) get_subid(t *testing.T) uint32 {
-	mc.c.registry.mutex.Lock()
-	defer mc.c.registry.mutex.Unlock()
-	return mc.c.registry.subIds[0]
+func (mc *testingSubmgrControl) get_subs_entrypoint_cnt(t *testing.T, origSubId uint32) int {
+	subs := mc.c.registry.GetSubscription(origSubId)
+	if subs == nil {
+		mc.TestError(t, "(submgr) no subs %d exists during entrypoint cnt get", origSubId)
+		return -1
+	}
+	return subs.EpList.Size()
 }
 
-func (mc *testingSubmgrControl) wait_subid_change(t *testing.T, origSubId uint32, secs int) (uint32, bool) {
+func (mc *testingSubmgrControl) wait_subs_entrypoint_cnt_change(t *testing.T, origSubId uint32, orig int, secs int) (int, bool) {
+
+	subs := mc.c.registry.GetSubscription(origSubId)
+	if subs == nil {
+		mc.TestError(t, "(submgr) no subs %d exists during entrypoint cnt wait", origSubId)
+		return -1, true
+	}
+
 	i := 1
 	for ; i <= secs*2; i++ {
-		mc.c.registry.mutex.Lock()
-		currSubId := mc.c.registry.subIds[0]
-		mc.c.registry.mutex.Unlock()
-		if currSubId != origSubId {
-			return currSubId, true
+		curr := subs.EpList.Size()
+		if curr != orig {
+			return curr, true
 		}
 		time.Sleep(500 * time.Millisecond)
 	}
-	mc.TestError(t, "(submgr) no subId change within %d secs", secs)
+	mc.TestError(t, "(submgr) no subs %d entrypoint cnt change within %d secs", origSubId, secs)
 	return 0, false
 }
 
+//
+// Counter check for received message. Note might not be yet handled
+//
 func (mc *testingSubmgrControl) get_msgcounter(t *testing.T) uint64 {
 	return mc.c.CntRecvMsg
 }
diff --git a/pkg/control/ut_messaging_test.go b/pkg/control/ut_messaging_test.go
index 5241537..1e196f0 100644
--- a/pkg/control/ut_messaging_test.go
+++ b/pkg/control/ut_messaging_test.go
@@ -25,6 +25,7 @@
 	"gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/xapp"
 	"github.com/stretchr/testify/assert"
 	"testing"
+	"time"
 )
 
 //-----------------------------------------------------------------------------
@@ -54,7 +55,7 @@
 	CaseBegin("TestSubReqAndRouteNok")
 
 	waiter := rtmgrHttp.AllocNextEvent(false)
-	newSubsId := mainCtrl.get_subid(t)
+	newSubsId := mainCtrl.get_registry_next_subid(t)
 	xappConn1.SendSubsReq(t, nil, nil)
 	waiter.WaitResult(t)
 
@@ -169,6 +170,10 @@
 	xappConn1.SendSubsReq(t, nil, cretrans) //Retransmitted SubReq
 	mainCtrl.wait_msgcounter_change(t, seqBef, 10)
 
+	// hack as there is no real way to see has message be handled.
+	// Previuos counter check just tells that is has been received by submgr
+	// --> artificial delay
+	<-time.After(1 * time.Second)
 	e2termConn1.SendSubsResp(t, crereq, cremsg)
 	e2SubsId := xappConn1.RecvSubsResp(t, cretrans)
 
@@ -233,6 +238,11 @@
 	xappConn1.SendSubsDelReq(t, deltrans, e2SubsId) //Retransmitted SubDelReq
 	mainCtrl.wait_msgcounter_change(t, seqBef, 10)
 
+	// hack as there is no real way to see has message be handled.
+	// Previuos counter check just tells that is has been received by submgr
+	// --> artificial delay
+	<-time.After(1 * time.Second)
+
 	e2termConn1.SendSubsDelResp(t, delreq, delmsg)
 	xappConn1.RecvSubsDelResp(t, deltrans)
 
@@ -297,6 +307,11 @@
 	xappConn1.SendSubsDelReq(t, deltranscol2, e2SubsId) //Colliding SubDelReq
 	mainCtrl.wait_msgcounter_change(t, seqBef, 10)
 
+	// hack as there is no real way to see has message be handled.
+	// Previuos counter check just tells that is has been received by submgr
+	// --> artificial delay
+	<-time.After(1 * time.Second)
+
 	// Del resp for first and second
 	e2termConn1.SendSubsDelResp(t, delreq1, delmsg1)
 
@@ -1266,9 +1281,9 @@
 	//Req2
 	rparams2 := &teststube2ap.E2StubSubsReqParams{}
 	rparams2.Init()
-	seqBef2 := mainCtrl.get_msgcounter(t)
+	subepcnt2 := mainCtrl.get_subs_entrypoint_cnt(t, crereq1.RequestId.InstanceId)
 	cretrans2 := xappConn2.SendSubsReq(t, rparams2, nil)
-	mainCtrl.wait_msgcounter_change(t, seqBef2, 10)
+	mainCtrl.wait_subs_entrypoint_cnt_change(t, crereq1.RequestId.InstanceId, subepcnt2, 10)
 
 	// E2t: send SubsFail (first)
 	fparams1 := &teststube2ap.E2StubSubsFailParams{}
@@ -1330,14 +1345,14 @@
 	rparams1.Init()
 	xappConn1.SendSubsReq(t, rparams1, nil)
 
-	e2termConn1.RecvSubsReq(t)
+	crereq1, _ := e2termConn1.RecvSubsReq(t)
 
 	//Req2
 	rparams2 := &teststube2ap.E2StubSubsReqParams{}
 	rparams2.Init()
-	seqBef2 := mainCtrl.get_msgcounter(t)
+	subepcnt2 := mainCtrl.get_subs_entrypoint_cnt(t, crereq1.RequestId.InstanceId)
 	xappConn2.SendSubsReq(t, rparams2, nil)
-	mainCtrl.wait_msgcounter_change(t, seqBef2, 10)
+	mainCtrl.wait_subs_entrypoint_cnt_change(t, crereq1.RequestId.InstanceId, subepcnt2, 10)
 
 	//Req1 (retransmitted)
 	e2termConn1.RecvSubsReq(t)
