diff --git a/xs/src/slic3r/Utils/Duet.cpp b/xs/src/slic3r/Utils/Duet.cpp
index a3dc4a3bb..f25327161 100644
--- a/xs/src/slic3r/Utils/Duet.cpp
+++ b/xs/src/slic3r/Utils/Duet.cpp
@@ -8,7 +8,6 @@
 #include <boost/log/trivial.hpp>
 #include <boost/property_tree/ptree.hpp>
 #include <boost/property_tree/json_parser.hpp>
-#include <boost/algorithm/string/replace.hpp>
 
 #include <wx/frame.h>
 #include <wx/event.h>
diff --git a/xs/src/slic3r/Utils/Http.cpp b/xs/src/slic3r/Utils/Http.cpp
index 3024b08fe..9b67ceea8 100644
--- a/xs/src/slic3r/Utils/Http.cpp
+++ b/xs/src/slic3r/Utils/Http.cpp
@@ -424,11 +424,14 @@ bool Http::ca_file_supported()
 std::string Http::url_encode(const std::string &str)
 {
 	::CURL *curl = ::curl_easy_init();
+	if (curl == nullptr) {
+		return str;
+	}
 	char *ce = ::curl_easy_escape(curl, str.c_str(), str.length());
 	std::string encoded = std::string(ce);
 
 	::curl_free(ce);
-	if (curl != nullptr) { ::curl_easy_cleanup(curl); }
+	::curl_easy_cleanup(curl);
 
 	return encoded;
 }