diff --git a/source/Lib/CommonLib/LoopFilter.cpp b/source/Lib/CommonLib/LoopFilter.cpp
index a4defc3f26b2d944a90514203dd115e34af2165b..4823520fda84a37aadacfd07c23391571855a33a 100644
--- a/source/Lib/CommonLib/LoopFilter.cpp
+++ b/source/Lib/CommonLib/LoopFilter.cpp
@@ -639,10 +639,21 @@ void LoopFilter::xSetEdgefilterMultiple( const CodingUnit&    cu,
   for( int ui = 0; ui < uiNumElem; ui++ )
   {
     m_aapbEdgeFilter[edgeDir][uiBsIdx] = bValue;
-    if( ! EdgeIdx )
+#if JVET_P0043_DEBLOCKING_CLEANUP 
+    if ( m_aapucBS[edgeDir][uiBsIdx] && bValue ) 
     {
-      m_aapucBS[edgeDir][uiBsIdx] = bValue;
+      m_aapucBS[edgeDir][uiBsIdx] = 3;  // both the TU and PU edge
     }
+    else 
+    {
+#endif 
+      if( ! EdgeIdx )
+      {
+        m_aapucBS[edgeDir][uiBsIdx] = bValue;
+      }
+#if JVET_P0043_DEBLOCKING_CLEANUP 
+    }
+#endif 
     uiBsIdx += uiAdd;
   }
 }
@@ -730,6 +741,9 @@ unsigned LoopFilter::xGetBoundaryStrengthSingle ( const CodingUnit& cu, const De
   }
 
   // and now the pred
+#if JVET_P0043_DEBLOCKING_CLEANUP 
+  if ( m_aapucBS[edgeDir][rasterIdx] != 0 && m_aapucBS[edgeDir][rasterIdx] != 3 ) return tmpBs;
+#endif
   const Position& lumaPosQ  = Position{ localPos.x,  localPos.y };
   const Position  lumaPosP  = ( edgeDir == EDGE_VER ) ? lumaPosQ.offset( -1, 0 ) : lumaPosQ.offset( 0, -1 );
   const MotionInfo&     miQ = cuQ.cs->getMotionInfo( lumaPosQ );
diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h
index 22ec38d4b25987880728225a67a107710dabd6c4..b6b4c25ba495a327c42b0cb968ac8f608b65d931 100644
--- a/source/Lib/CommonLib/TypeDef.h
+++ b/source/Lib/CommonLib/TypeDef.h
@@ -50,6 +50,8 @@
 #include <assert.h>
 #include <cassert>
 
+#define JVET_P0043_DEBLOCKING_CLEANUP                     1 // JVET-P0043: Fix deblocking design inconsistency in the affine and TPM mode
+
 #define JVET_P0273_MTSIntraMaxCand                        1 // JVET-P0273: Use MTSIntraMaxCand if LFNST is used
 
 #define JVET_P0057_BDOF_PROF_HARMONIZATION                1 // JVET-P0057: harmonization of BDOF and PROF on motion refinement precision