diff --git a/source/Lib/CommonLib/ParameterSetManager.h b/source/Lib/CommonLib/ParameterSetManager.h
index e7213c238f9843618b4633e9dfcdf5d9d79e7c8e..8c8ea5f1ee8f1f05f285367d4a85cd16e21d6b7b 100644
--- a/source/Lib/CommonLib/ParameterSetManager.h
+++ b/source/Lib/CommonLib/ParameterSetManager.h
@@ -140,7 +140,7 @@ public:
 
   void checkAuApsContent( APS *aps, std::vector<int>& accessUnitApsNals )
   {
-    int apsId = aps->getAPSId() + MAX_NUM_APS * aps->getAPSType();
+    int apsId = ( aps->getAPSId() << NUM_APS_TYPE_LEN ) + aps->getAPSType();
 
     if( std::find( accessUnitApsNals.begin(), accessUnitApsNals.end(), apsId ) != accessUnitApsNals.end() )
     {