fixed some build errors
diff --git a/src/challenge-module/challenge-credential.cpp b/src/challenge-module/challenge-credential.cpp
index a4ca557..16724bc 100644
--- a/src/challenge-module/challenge-credential.cpp
+++ b/src/challenge-module/challenge-credential.cpp
@@ -80,6 +80,7 @@
 void
 ChallengeCredential::handleChallengeRequest(const Block& params, CertificateRequest& request)
 {
+  params.parse();
   if (m_trustAnchors.empty()) {
     parseConfigFile();
   }
@@ -174,10 +175,8 @@
   else {
     _LOG_ERROR("Client's status and challenge status are wrong");
   }
-  request.parse();
+  request.encode();
   return request;
 }
-
-
 } // namespace ndncert
 } // namespace ndn
diff --git a/src/challenge-module/challenge-email.cpp b/src/challenge-module/challenge-email.cpp
index db069c8..4ec3c6f 100644
--- a/src/challenge-module/challenge-email.cpp
+++ b/src/challenge-module/challenge-email.cpp
@@ -50,6 +50,7 @@
 void
 ChallengeEmail::handleChallengeRequest(const Block& params, CertificateRequest& request)
 {
+  params.parse();
   auto currentTime = time::system_clock::now();
   if (request.m_challengeStatus == "") {
     // for the first time, init the challenge
@@ -200,7 +201,7 @@
   else {
     _LOG_ERROR("Client's status and challenge status are wrong");
   }
-  request.parse();
+  request.encode();
   return request;
 }
 
diff --git a/src/challenge-module/challenge-pin.cpp b/src/challenge-module/challenge-pin.cpp
index f31ca77..e809213 100644
--- a/src/challenge-module/challenge-pin.cpp
+++ b/src/challenge-module/challenge-pin.cpp
@@ -44,6 +44,7 @@
 void
 ChallengePin::handleChallengeRequest(const Block& params, CertificateRequest& request)
 {
+  params.parse();
   auto currentTime = time::system_clock::now();
   if (request.m_challengeStatus == "") {
     _LOG_TRACE("Challenge Interest arrives. Init the challenge");
@@ -172,7 +173,7 @@
   else {
     _LOG_ERROR("Client's status and challenge status are wrong");
   }
-  request.parse();
+  request.encode();
   return request;
 }
 } // namespace ndncert