diff --git a/src/security/conf/checker.hpp b/src/security/conf/checker.hpp
index 72ae726..6955dfe 100644
--- a/src/security/conf/checker.hpp
+++ b/src/security/conf/checker.hpp
@@ -101,16 +101,16 @@
                             interestName[INTEREST_SIG_VALUE].blockFromValue());
         return check(interest, signature, onValidated, onValidationFailed);
       }
-    catch (const Tlv::Error& e)
-      {
-        onValidationFailed(interest.shared_from_this(), "Cannot decode signature related TLVs");
-        return -1;
-      }
-    catch (const Signature::Error& e)
+    catch (Signature::Error& e)
       {
         onValidationFailed(interest.shared_from_this(), "Invalid signature");
         return -1;
       }
+    catch (Tlv::Error& e)
+      {
+        onValidationFailed(interest.shared_from_this(), "Cannot decode signature related TLVs");
+        return -1;
+      }
   }
 
 private:
@@ -147,7 +147,7 @@
                   return -1;
                 }
             }
-          catch (const SignatureSha256WithRsa::Error& e)
+          catch (SignatureSha256WithRsa::Error& e)
             {
               onValidationFailed(packet.shared_from_this(),
                                  "Cannot decode Sha256WithRsa signature!");
@@ -221,16 +221,16 @@
                             interestName[INTEREST_SIG_VALUE].blockFromValue());
         return check(interest, signature, onValidated, onValidationFailed);
       }
-    catch (const Tlv::Error& e)
-      {
-        onValidationFailed(interest.shared_from_this(), "Cannot decode signature related TLVs");
-        return -1;
-      }
-    catch (const Signature::Error& e)
+    catch (Signature::Error& e)
       {
         onValidationFailed(interest.shared_from_this(), "Invalid signature");
         return -1;
       }
+    catch (Tlv::Error& e)
+      {
+        onValidationFailed(interest.shared_from_this(), "Cannot decode signature related TLVs");
+        return -1;
+      }
   }
 
 private:
@@ -280,13 +280,13 @@
                   return -1;
                 }
             }
-          catch (const KeyLocator::Error& e)
+          catch (KeyLocator::Error& e)
             {
               onValidationFailed(packet.shared_from_this(),
                                  "KeyLocator does not have name!");
               return -1;
             }
-          catch (const SignatureSha256WithRsa::Error& e)
+          catch (SignatureSha256WithRsa::Error& e)
             {
               onValidationFailed(packet.shared_from_this(),
                                  "Cannot decode signature!");
diff --git a/src/security/conf/filter.hpp b/src/security/conf/filter.hpp
index 7d5b833..4145222 100644
--- a/src/security/conf/filter.hpp
+++ b/src/security/conf/filter.hpp
@@ -207,7 +207,7 @@
           {
             return shared_ptr<RegexNameFilter>(new RegexNameFilter(regexString));
           }
-        catch (const Regex::Error& e)
+        catch (Regex::Error& e)
           {
             throw Error("Wrong filter.regex: " + regexString);
           }
diff --git a/src/security/conf/key-locator-checker.hpp b/src/security/conf/key-locator-checker.hpp
index 5785c59..e040d80 100644
--- a/src/security/conf/key-locator-checker.hpp
+++ b/src/security/conf/key-locator-checker.hpp
@@ -107,7 +107,7 @@
         failInfo = "KeyLocatorChecker failed!";
         return false;
       }
-    catch (const KeyLocator::Error& e)
+    catch (KeyLocator::Error& e)
       {
         failInfo = "KeyLocator does not have name";
         return false;
@@ -141,7 +141,7 @@
         failInfo = "KeyLocatorChecker failed!";
         return false;
       }
-    catch (const KeyLocator::Error& e)
+    catch (KeyLocator::Error& e)
       {
         failInfo = "KeyLocator does not have name";
         return false;
@@ -182,7 +182,7 @@
         failInfo = "KeyLocatorChecker failed!";
         return false;
       }
-    catch (const KeyLocator::Error& e)
+    catch (KeyLocator::Error& e)
       {
         failInfo = "KeyLocator does not have name";
         return false;
@@ -277,7 +277,7 @@
             return shared_ptr<RegexKeyLocatorNameChecker>
               (new RegexKeyLocatorNameChecker(regexString));
           }
-        catch (const Regex::Error& e)
+        catch (Regex::Error& e)
           {
             throw Error("Invalid checker.key-locator.regex: " + regexString);
           }
@@ -344,7 +344,7 @@
                                               kRegex, kExpand,
                                               relation));
           }
-        catch (const Regex::Error& e)
+        catch (Regex::Error& e)
           {
             throw Error("Invalid regex for key-locator.hyper-relation");
           }
