diff --git a/libwccl/ops/operator.h b/libwccl/ops/operator.h
index 625d205f4d5cc1be197e37eced0041261ab9db92..4ba168726146b776dd784aadc18c1e688515454d 100644
--- a/libwccl/ops/operator.h
+++ b/libwccl/ops/operator.h
@@ -307,7 +307,7 @@ template <class T> inline
 Operator<T>& Operator<T>::operator=(const Operator& other) {
 	BOOST_ASSERT(other.function_body_);
 	BOOST_ASSERT(other.variables_);
-	function_body_.reset(other.function_body_);
+	function_body_ = other.function_body_;
 	variables_.reset(other.variables_->clone());
 	return *this;
 }
diff --git a/libwccl/ops/parsedexpression.h b/libwccl/ops/parsedexpression.h
index 5a41d0c8d2ce31e2ea4d7190ace451761b3efe0f..bf496b872aacf6f6f60489e22a32abbc92f73119 100644
--- a/libwccl/ops/parsedexpression.h
+++ b/libwccl/ops/parsedexpression.h
@@ -156,7 +156,7 @@ public:
 protected:
 	explicit ParsedExpression(const Variables& variables);
 
-	const boost::shared_ptr<Variables> variables_;
+	boost::shared_ptr<Variables> variables_;
 
 	virtual ParsedExpression* clone_internal() const = 0;
 };