diff --git a/libwccl/values/matchvector.cpp b/libwccl/values/matchvector.cpp
index d53c3120324a5fad020d385ded734d98e8c87483..24b77b8e01f8dea3b8d16298789585e4a785635d 100644
--- a/libwccl/values/matchvector.cpp
+++ b/libwccl/values/matchvector.cpp
@@ -89,7 +89,7 @@ void MatchVector::append(const boost::shared_ptr<MatchData> &m)
 	matches_.push_back(boost::shared_ptr<Match>(new Match(m)));
 }
 
-const boost::shared_ptr<const Match>& MatchVector::submatch(size_t idx) const {
+const boost::shared_ptr<const Match> MatchVector::submatch(size_t idx) const {
 	if (idx + 1< matches_.size() || idx == 0) {
 		return matches_[idx - 1];
 	} else {