diff --git a/source/Lib/CommonLib/IntraPrediction.cpp b/source/Lib/CommonLib/IntraPrediction.cpp
index a2115a3cb6f52513c3e69ce1cce26dc1546f3619..c3026c0774dfcdbb5067659f55942a64cdcdcd06 100644
--- a/source/Lib/CommonLib/IntraPrediction.cpp
+++ b/source/Lib/CommonLib/IntraPrediction.cpp
@@ -1082,10 +1082,20 @@ void IntraPrediction::collectContext(const CompArea& area,const CodingUnit& cu,c
   const int totalAboveUnits{static_cast<int>(pairSizesCtxBorders.second)/unitWidth};
   const int totalLeftUnits{static_cast<int>(pairSizesCtxBorders.first)/unitHeight};
   const int totalUnits{totalAboveUnits + totalLeftUnits + 1};
+  const int numAboveUnits{tuWidth/unitWidth};
+  const int numLeftUnits{tuHeight/unitHeight};
+  const int numAboveRightUnits{totalAboveUnits - numAboveUnits};
+  const int numLeftBelowUnits{totalLeftUnits - numLeftUnits};
   const Position posLT(area);
+  const Position posRT(area.topRight());
+  const Position posLB(area.bottomLeft());
   bool arrayNeighborFlags[4*MAX_NUM_PART_IDXS_IN_CTU_WIDTH + 1];
   memset(arrayNeighborFlags,0,totalUnits);
   arrayNeighborFlags[totalLeftUnits] = isAboveLeftAvailable(cu,chType,posLT);
+  isAboveAvailable(cu,chType,posLT,numAboveUnits,unitWidth,arrayNeighborFlags + totalLeftUnits + 1);
+  isAboveRightAvailable(cu,chType,posRT,numAboveRightUnits,unitWidth,arrayNeighborFlags + totalLeftUnits + 1 + numAboveUnits);
+  isLeftAvailable(cu, chType,posLT,numLeftUnits,unitHeight,arrayNeighborFlags + totalLeftUnits - 1);
+  isBelowLeftAvailable(cu,chType,posLB,numLeftBelowUnits,unitHeight,arrayNeighborFlags + totalLeftUnits - 1 - numLeftUnits);
   int error_code{0};
 #if JVET_AB0149_ACTIVATE_WRITER_BLOCK_STATS
   if (isComputedHeightWidthMasks)