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