fixed some build errors
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