diff --git a/alib2data/src/regexp/formal/FormalRegExpConcatenation.cpp b/alib2data/src/regexp/formal/FormalRegExpConcatenation.cpp
index bf8ace2e5883f1a313f02e277b8f52ee560d8921..32ca5ee090cf1929137dcd0cf126f27e05b0b5fb 100644
--- a/alib2data/src/regexp/formal/FormalRegExpConcatenation.cpp
+++ b/alib2data/src/regexp/formal/FormalRegExpConcatenation.cpp
@@ -93,7 +93,7 @@ void FormalRegExpConcatenation::setRightElement(const FormalRegExpElement& eleme
 	FormalRegExpElement* elem = element.clone();
 	if(this->parentRegExp && !elem->attachRegExp(this->parentRegExp))
 		throw exception::AlibException("Input symbols not in the alphabet.");
-	delete left;
+	delete right;
 	this->right = elem;
 }
 
@@ -101,7 +101,7 @@ void FormalRegExpConcatenation::setRightElement(FormalRegExpElement&& element) {
 	FormalRegExpElement* elem = std::move(element).plunder();
 	if(this->parentRegExp && !elem->attachRegExp(this->parentRegExp))
 		throw exception::AlibException("Input symbols not in the alphabet.");
-	delete left;
+	delete right;
 	this->right = elem;
 }