diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h
index 4f4ebd36cc508af2184bc35896c416cc0e2f6415..0f897aef159876f9a415495675ae871231b5f23b 100644
--- a/source/Lib/CommonLib/TypeDef.h
+++ b/source/Lib/CommonLib/TypeDef.h
@@ -86,6 +86,8 @@
 
 #define JVET_S0179_CONDITIONAL_SIGNAL_GCI                 1 // JVET-S0179: Conditional signalling of GCI fields
 
+#define JVET_R0064                                        1 // JVET-R0064, aspect 2: Move the flag scaling_matrix_for_lfnst_disabled_flag from the scaling_list_data( ) syntax to the SPS.
+
 #define JVET_S0049_ASPECT4                                1 // JVET-S0049 aspect 4: Constrain the value of pps_alf_info_in_ph_flag to be equal to 0 when the PH is in the SH
 
 #define JVET_S0258_SUBPIC_CONSTRAINTS                     1 // JVET-S0258: sub-picture constraints
@@ -878,6 +880,7 @@ enum SPSExtensionFlagIndex
   NUM_SPS_EXTENSION_FLAGS = 8
 };
 
+#ifndef PPS_EXTENSION_BUGFIX
 enum PPSExtensionFlagIndex
 {
   PPS_EXT__REXT           = 0,
@@ -885,6 +888,7 @@ enum PPSExtensionFlagIndex
 //PPS_EXT__SHVC           = 2, //for use in future versions
   NUM_PPS_EXTENSION_FLAGS = 8
 };
+#endif
 
 // TODO: Existing names used for the different NAL unit types can be altered to better reflect the names in the spec.
 //       However, the names in the spec are not yet stable at this point. Once the names are stable, a cleanup
diff --git a/source/Lib/DecoderLib/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp
index 8c8cd65452cb9899f4824b7908578a4c0a1cb4dc..9baf5689ea07953e468aa5d73a72837baac83419 100644
--- a/source/Lib/DecoderLib/VLCReader.cpp
+++ b/source/Lib/DecoderLib/VLCReader.cpp
@@ -905,8 +905,11 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS )
   READ_FLAG( uiCode, "slice_header_extension_present_flag");
   pcPPS->setSliceHeaderExtensionPresentFlag(uiCode);
 
-
+#ifndef PPS_EXTENSION_BUGFIX
   READ_FLAG( uiCode, "pps_extension_present_flag");
+#else
+  READ_FLAG( uiCode, "pps_extension_flag");
+#endif
   if (uiCode)
   {
       while ( xMoreRbspData() )
diff --git a/source/Lib/EncoderLib/VLCWriter.cpp b/source/Lib/EncoderLib/VLCWriter.cpp
index 68fb0f30f0f888f2871d16134d0ee3960c488909..5b4f98b320cefb4c30a6b10a76e90f0e9ee1c964 100644
--- a/source/Lib/EncoderLib/VLCWriter.cpp
+++ b/source/Lib/EncoderLib/VLCWriter.cpp
@@ -501,6 +501,7 @@ void HLSWriter::codePPS( const PPS* pcPPS )
   WRITE_FLAG( pcPPS->getPictureHeaderExtensionPresentFlag() ? 1 : 0, "picture_header_extension_present_flag");
   WRITE_FLAG( pcPPS->getSliceHeaderExtensionPresentFlag() ? 1 : 0, "slice_header_extension_present_flag");
 
+#ifndef PPS_EXTENSION_BUGFIX
   bool pps_extension_present_flag=false;
   bool pps_extension_flags[NUM_PPS_EXTENSION_FLAGS]={false};
 
@@ -513,6 +514,9 @@ void HLSWriter::codePPS( const PPS* pcPPS )
       WRITE_FLAG( pps_extension_flags[i]?1:0, "pps_extension_data_flag" );
     }
   } // pps_extension_present_flag is non-zero
+#else
+  WRITE_FLAG(0, "pps_extension_flag");
+#endif
   xWriteRbspTrailingBits();
 }