diff --git a/alib2algo/src/automaton/determinize/DeterminizeRHDPDAPart.hxx b/alib2algo/src/automaton/determinize/DeterminizeRHDPDAPart.hxx
index e6056c43abaaa71cbf46cc18d1924b0753044449..455e241d7a55f32daf414c63bc29fcd9d932df49 100644
--- a/alib2algo/src/automaton/determinize/DeterminizeRHDPDAPart.hxx
+++ b/alib2algo/src/automaton/determinize/DeterminizeRHDPDAPart.hxx
@@ -25,7 +25,7 @@ void addRetTransition(const ext::set < ext::pair < StateType, StateType > > & fr
 }
 
 template < class InputSymbolType, class EpsilonType, class PushdownStoreSymbolType, class StateType >
-void retInitial(const ext::set < ext::pair < StateType, StateType > > & state, const ext::pair < ext::set < ext::pair < StateType, StateType > >, ext::variant < EpsilonType, InputSymbolType > > & pdaSymbol, const ext::variant < EpsilonType, InputSymbolType>& input, const automaton::RealTimeHeightDeterministicNPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType > & nondeterministic, automaton::RealTimeHeightDeterministicDPDA < InputSymbolType, EpsilonType, ext::pair < ext::set < ext::pair < StateType, StateType > >, ext::variant < EpsilonType, InputSymbolType > >, ext::set < ext::pair < StateType, StateType > > > & deterministic, ext::set < ext::pair < ext::set < ext::pair < StateType, StateType > >, ext::pair < ext::set < ext::pair < StateType, StateType > >, ext::variant < EpsilonType, InputSymbolType > > > > & rubbishReturnTransitions ) {
+ext::set < ext::pair < StateType, StateType > > retInitial(const ext::set < ext::pair < StateType, StateType > > & state, const ext::variant < EpsilonType, InputSymbolType>& input, const automaton::RealTimeHeightDeterministicNPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType > & nondeterministic ) {
 	const ext::set<ext::pair<StateType, StateType>> & S = state;
 
 	ext::set<ext::pair<StateType, StateType>> S1;
@@ -45,14 +45,11 @@ void retInitial(const ext::set < ext::pair < StateType, StateType > > & state, c
 		}
 	}
 
-	if ( ! S1.empty ( ) )
-		addRetTransition ( state, input, pdaSymbol, std::move ( S1 ), deterministic );
-	else
-		rubbishReturnTransitions.insert(ext::make_pair(state, pdaSymbol ) );
+	return S1;
 }
 
 template < class InputSymbolType, class EpsilonType, class PushdownStoreSymbolType, class StateType >
-void ret(const ext::set < ext::pair < StateType, StateType > > & state, const ext::pair < ext::set < ext::pair < StateType, StateType > >, ext::variant < EpsilonType, InputSymbolType > > & pdaSymbol, const ext::variant < EpsilonType, InputSymbolType > & input, const automaton::RealTimeHeightDeterministicNPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType > & nondeterministic, automaton::RealTimeHeightDeterministicDPDA < InputSymbolType, EpsilonType, ext::pair < ext::set < ext::pair < StateType, StateType > >, ext::variant < EpsilonType, InputSymbolType > >, ext::set < ext::pair < StateType, StateType > > > & deterministic, ext::set < ext::pair < ext::set < ext::pair < StateType, StateType > >, ext::pair < ext::set < ext::pair < StateType, StateType > >, ext::variant < EpsilonType, InputSymbolType > > > > & rubbishReturnTransitions) {
+ext::set < ext::pair < StateType, StateType > > ret(const ext::set < ext::pair < StateType, StateType > > & state, const ext::pair < ext::set < ext::pair < StateType, StateType > >, ext::variant < EpsilonType, InputSymbolType > > & pdaSymbol, const ext::variant < EpsilonType, InputSymbolType > & input, const automaton::RealTimeHeightDeterministicNPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType > & nondeterministic ) {
 	const ext::set<ext::pair<StateType, StateType>> & S = state;
 	const ext::set<ext::pair<StateType, StateType>>& S1 = pdaSymbol.first;
 
@@ -98,10 +95,7 @@ void ret(const ext::set < ext::pair < StateType, StateType > > & state, const ex
 		}
 	}
 
-	if ( ! S2.empty ( ) )
-		addRetTransition(state, input, pdaSymbol, std::move ( S2 ), deterministic);
-	else
-		rubbishReturnTransitions.insert(ext::make_pair(state, pdaSymbol ) );
+	return S2;
 }
 
 template < class InputSymbolType, class EpsilonType, class StateType >
@@ -114,7 +108,7 @@ void addCallTransition(const ext::set < ext::pair < StateType, StateType > > & f
 }
 
 template < class InputSymbolType, class EpsilonType, class PushdownStoreSymbolType, class StateType >
-void call(const ext::set < ext::pair < StateType, StateType > > & state, const ext::variant < EpsilonType, InputSymbolType > & input, const automaton::RealTimeHeightDeterministicNPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType > & nondeterministic, automaton::RealTimeHeightDeterministicDPDA < InputSymbolType, EpsilonType, ext::pair < ext::set < ext::pair < StateType, StateType > >, ext::variant < EpsilonType, InputSymbolType > >, ext::set < ext::pair < StateType, StateType > > > & deterministic ) {
+ext::set < ext::pair < StateType, StateType > > call(const ext::set < ext::pair < StateType, StateType > > & state, const ext::variant < EpsilonType, InputSymbolType > & input, const automaton::RealTimeHeightDeterministicNPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType > & nondeterministic ) {
 	const ext::set < ext::pair < StateType, StateType > > & S = state;
 
 	ext::set < StateType > R = retrieveDSubSet(S);
@@ -133,8 +127,7 @@ void call(const ext::set < ext::pair < StateType, StateType > > & state, const e
 		}
 	}
 
-	if ( ! R1.empty ( ) )
-		addCallTransition ( state, input, createIdentity ( std::move ( R1 ) ), ext::make_pair ( state, input ), deterministic);
+	return createIdentity ( std::move ( R1 ) );
 }
 
 template < class InputSymbolType, class EpsilonType, class StateType >
@@ -146,7 +139,7 @@ void addLocalTransition ( const ext::set < ext::pair < StateType, StateType > >
 }
 
 template < class InputSymbolType, class EpsilonType, class PushdownStoreSymbolType, class StateType >
-void local(const ext::set < ext::pair < StateType, StateType > > & state, const ext::variant < EpsilonType, InputSymbolType > & input, const automaton::RealTimeHeightDeterministicNPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType > & nondeterministic, automaton::RealTimeHeightDeterministicDPDA < InputSymbolType, EpsilonType, ext::pair < ext::set < ext::pair < StateType, StateType > >, ext::variant < EpsilonType, InputSymbolType > >, ext::set < ext::pair < StateType, StateType > > > & deterministic ) {
+ext::set < ext::pair < StateType, StateType > > local(const ext::set < ext::pair < StateType, StateType > > & state, const ext::variant < EpsilonType, InputSymbolType > & input, const automaton::RealTimeHeightDeterministicNPDA < InputSymbolType, EpsilonType, PushdownStoreSymbolType, StateType > & nondeterministic ) {
 	const ext::set<ext::pair<StateType, StateType>> & S = state;
 	ext::set<ext::pair<StateType, StateType>> S1;
 
@@ -165,8 +158,7 @@ void local(const ext::set < ext::pair < StateType, StateType > > & state, const
 		}
 	}
 
-	if ( ! S1.empty ( ) )
-		addLocalTransition ( state, input, std::move ( S1 ), deterministic );
+	return S1;
 }
 
 template < class InputSymbolType, class EpsilonType, class PushdownStoreSymbolType, class StateType >
@@ -209,12 +201,17 @@ automaton::RealTimeHeightDeterministicDPDA < InputSymbolType, EpsilonType, ext::
 	ext::set < ext::pair < DeterministicStateType, DeterministicPushdownStoreSymbolType > > rubbishReturnTransitions;
 
 	for(;;) {
-		ext::set<ext::pair<DeterministicStateType, DeterministicPushdownStoreSymbolType>> stateSymbols = existsDirtyStateSymbol(d, rubbishReturnTransitions, n);
+		ext::set<ext::pair<DeterministicStateType, DeterministicPushdownStoreSymbolType>> stateSymbols = existsDirtyStateSymbol(d, n);
+
+		for ( const ext::pair < DeterministicStateType, DeterministicPushdownStoreSymbolType > & rubbishStateSymbols : rubbishReturnTransitions ) {
+			stateSymbols.erase ( rubbishStateSymbols );
+		}
+
 		ext::set<DeterministicStateType> states = existsDirtyState(d, n);
 
 		if(stateSymbols.empty() && states.empty()) break;
 
-		for(const auto& stateSymbol : stateSymbols) {
+		for ( const ext::pair<DeterministicStateType, DeterministicPushdownStoreSymbolType> & stateSymbol : stateSymbols ) {
 			if ( common::GlobalData::verbose )
 				common::Streams::log << "Dirty state symbol: " << stateSymbol << std::endl;
 
@@ -222,11 +219,24 @@ automaton::RealTimeHeightDeterministicDPDA < InputSymbolType, EpsilonType, ext::
 
 			ext::set<ext::variant<EpsilonType, InputSymbolType>>& retPart = std::get<2>(partitioning);
 
-			for(const auto& symbol : retPart) {
-				if(stateSymbol.second == d.getBottomOfTheStackSymbol()) {
-					retInitial(stateSymbol.first, stateSymbol.second, symbol, n, d, rubbishReturnTransitions);
+			const DeterministicStateType & state = stateSymbol.first;
+			const DeterministicPushdownStoreSymbolType & pdaSymbol = stateSymbol.second;
+
+			for(const ext::variant < EpsilonType, InputSymbolType > & input : retPart ) {
+				if ( pdaSymbol == d.getBottomOfTheStackSymbol()) {
+					DeterministicStateType to = retInitial ( state, input, n );
+
+					if ( ! to.empty ( ) )
+						addRetTransition ( state, input, pdaSymbol, std::move ( to ), d );
+					else
+						rubbishReturnTransitions.insert(ext::make_pair(state, pdaSymbol ) );
 				} else {
-					ret(stateSymbol.first, stateSymbol.second, symbol, n, d, rubbishReturnTransitions);
+					DeterministicStateType to = ret(state, pdaSymbol, input, n );
+
+					if ( ! to.empty ( ) )
+						addRetTransition ( state, input, pdaSymbol, std::move ( to ), d );
+					else
+						rubbishReturnTransitions.insert ( ext::make_pair ( state, pdaSymbol ) );
 				}
 			}
 		}
@@ -239,11 +249,15 @@ automaton::RealTimeHeightDeterministicDPDA < InputSymbolType, EpsilonType, ext::
 			ext::set<ext::variant<EpsilonType, InputSymbolType>>& localPart = std::get<0>(partitioning);
 			ext::set<ext::variant<EpsilonType, InputSymbolType>>& callPart = std::get<1>(partitioning);
 
-			for(const auto& symbol : localPart) {
-				local(state, symbol, n, d);
+			for ( const ext::variant < EpsilonType, InputSymbolType > & input : localPart ) {
+				DeterministicStateType to = local ( state, input, n );
+				if ( ! to.empty ( ) )
+					addLocalTransition ( state, input, std::move ( to ), d );
 			}
-			for(const auto& symbol : callPart) {
-				call(state, symbol, n, d);
+			for ( const ext::variant < EpsilonType, InputSymbolType > & input : callPart ) {
+				DeterministicStateType to = call ( state, input, n );
+				if ( ! to.empty ( ) )
+					addCallTransition ( state, input, to, ext::make_pair ( state, input ), d );
 			}
 		}
 	}
diff --git a/alib2algo/src/automaton/determinize/DeterminizeVPAPart.hxx b/alib2algo/src/automaton/determinize/DeterminizeVPAPart.hxx
index db51182c14b30aae1a33af1bda48d933a22e8c9e..b5fb44b3031d5038e92a368c35e1de5ab518b99d 100644
--- a/alib2algo/src/automaton/determinize/DeterminizeVPAPart.hxx
+++ b/alib2algo/src/automaton/determinize/DeterminizeVPAPart.hxx
@@ -25,7 +25,7 @@ void addRetTransition(const ext::set < ext::pair < StateType, StateType > > & fr
 }
 
 template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
-void retInitial ( const ext::set < ext::pair < StateType, StateType > > & state, const ext::pair < ext::set < ext::pair < StateType, StateType > >, InputSymbolType > & pdaSymbol, const InputSymbolType & input, const automaton::VisiblyPushdownNPDA < InputSymbolType, PushdownStoreSymbolType, StateType > & nondeterministic, automaton::VisiblyPushdownDPDA < InputSymbolType, ext::pair < ext::set < ext::pair < StateType, StateType > >, InputSymbolType >, ext::set < ext::pair < StateType, StateType > > > & deterministic) {
+ext::set<ext::pair<StateType, StateType>> retInitial ( const ext::set < ext::pair < StateType, StateType > > & state, const InputSymbolType & input, const automaton::VisiblyPushdownNPDA < InputSymbolType, PushdownStoreSymbolType, StateType > & nondeterministic ) {
 	const ext::set<ext::pair<StateType, StateType>> & S = state;
 
 	ext::set<ext::pair<StateType, StateType>> S1;
@@ -45,11 +45,11 @@ void retInitial ( const ext::set < ext::pair < StateType, StateType > > & state,
 		}
 	}
 
-	addRetTransition(state, input, pdaSymbol, std::move(S1), deterministic);
+	return S1;
 }
 
 template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
-void ret(const ext::set < ext::pair < StateType, StateType > > & state, const ext::pair < ext::set < ext::pair < StateType, StateType > >, InputSymbolType > & pdaSymbol, const InputSymbolType & input, const automaton::VisiblyPushdownNPDA < InputSymbolType, PushdownStoreSymbolType, StateType > & nondeterministic, automaton::VisiblyPushdownDPDA < InputSymbolType, ext::pair < ext::set < ext::pair < StateType, StateType > >, InputSymbolType >, ext::set < ext::pair < StateType, StateType > > > & deterministic) {
+ext::set<ext::pair<StateType, StateType>> ret(const ext::set < ext::pair < StateType, StateType > > & state, const ext::pair < ext::set < ext::pair < StateType, StateType > >, InputSymbolType > & pdaSymbol, const InputSymbolType & input, const automaton::VisiblyPushdownNPDA < InputSymbolType, PushdownStoreSymbolType, StateType > & nondeterministic ) {
 	const ext::set<ext::pair<StateType, StateType>> & S = state;
 	const ext::set<ext::pair<StateType, StateType>>& S1 = pdaSymbol.first;
 
@@ -95,7 +95,7 @@ void ret(const ext::set < ext::pair < StateType, StateType > > & state, const ex
 		}
 	}
 
-	addRetTransition(state, input, pdaSymbol, std::move(S2), deterministic);
+	return S2;
 }
 
 template < class InputSymbolType, class StateType >
@@ -108,7 +108,7 @@ void addCallTransition(const ext::set < ext::pair < StateType, StateType > > & f
 }
 
 template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
-void call(const ext::set < ext::pair < StateType, StateType > > & state, const InputSymbolType& input, const automaton::VisiblyPushdownNPDA < InputSymbolType, PushdownStoreSymbolType, StateType > & nondeterministic, automaton::VisiblyPushdownDPDA < InputSymbolType, ext::pair < ext::set < ext::pair < StateType, StateType > >, InputSymbolType >, ext::set < ext::pair < StateType, StateType > > > & deterministic) {
+ext::set<ext::pair<StateType, StateType>> call(const ext::set < ext::pair < StateType, StateType > > & state, const InputSymbolType& input, const automaton::VisiblyPushdownNPDA < InputSymbolType, PushdownStoreSymbolType, StateType > & nondeterministic ) {
 	const ext::set<ext::pair<StateType, StateType>> & S = state;
 
 	ext::set<StateType> R = retrieveDSubSet(S);
@@ -127,7 +127,7 @@ void call(const ext::set < ext::pair < StateType, StateType > > & state, const I
 		}
 	}
 
-	addCallTransition(state, input, createIdentity(std::move(R1)), ext::make_pair(state, input), deterministic);
+	return createIdentity ( std::move ( R1 ) );
 }
 
 template < class InputSymbolType, class StateType >
@@ -139,7 +139,7 @@ void addLocalTransition(const ext::set < ext::pair < StateType, StateType > > &
 }
 
 template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
-void local(const ext::set < ext::pair < StateType, StateType > > & state, const InputSymbolType& input, const automaton::VisiblyPushdownNPDA < InputSymbolType, PushdownStoreSymbolType, StateType > & nondeterministic, automaton::VisiblyPushdownDPDA < InputSymbolType, ext::pair < ext::set < ext::pair < StateType, StateType > >, InputSymbolType >, ext::set < ext::pair < StateType, StateType > > > & deterministic) {
+ext::set<ext::pair<StateType, StateType>> local(const ext::set < ext::pair < StateType, StateType > > & state, const InputSymbolType& input, const automaton::VisiblyPushdownNPDA < InputSymbolType, PushdownStoreSymbolType, StateType > & nondeterministic ) {
 	const ext::set<ext::pair<StateType, StateType>> & S = state;
 	ext::set<ext::pair<StateType, StateType>> S1;
 
@@ -158,7 +158,7 @@ void local(const ext::set < ext::pair < StateType, StateType > > & state, const
 		}
 	}
 
-	addLocalTransition(state, input, std::move(S1), deterministic);
+	return S1;
 }
 
 template < class InputSymbolType, class PushdownStoreSymbolType, class StateType >
@@ -175,30 +175,35 @@ automaton::VisiblyPushdownDPDA < InputSymbolType, ext::pair < ext::set < ext::pa
 	d.setLocalInputAlphabet(n.getLocalInputAlphabet());
 	d.setReturnInputAlphabet(n.getReturnInputAlphabet());
 
-	ext::set < ext::pair < DeterministicStateType, DeterministicPushdownStoreSymbolType > > rubbishReturnTransitions;
-
 	for(;;) {
-		ext::set<ext::pair<DeterministicStateType, DeterministicPushdownStoreSymbolType>> stateSymbols = existsDirtyStateSymbol(d, rubbishReturnTransitions, n);
+		ext::set<ext::pair<DeterministicStateType, DeterministicPushdownStoreSymbolType>> stateSymbols = existsDirtyStateSymbol(d, n);
 		ext::set<DeterministicStateType> states = existsDirtyState(d, n);
 
 		if(stateSymbols.empty() && states.empty()) break;
 
-		for(const auto& stateSymbol: stateSymbols) {
-			for(const InputSymbolType& symbol : n.getReturnInputAlphabet()) {
-				if(stateSymbol.second == d.getBottomOfTheStackSymbol()) {
-					retInitial(stateSymbol.first, stateSymbol.second, symbol, n, d);
+		for ( const ext::pair < DeterministicStateType, DeterministicPushdownStoreSymbolType > & stateSymbol : stateSymbols ) {
+			const DeterministicStateType & state = stateSymbol.first;
+			const DeterministicPushdownStoreSymbolType & pdaSymbol = stateSymbol.second;
+
+			for ( const InputSymbolType & input : n.getReturnInputAlphabet ( ) ) {
+				if ( pdaSymbol == d.getBottomOfTheStackSymbol ( ) ) {
+					DeterministicStateType to = retInitial ( state, input, n);
+					addRetTransition ( state, input, pdaSymbol, std::move ( to ), d );
 				} else {
-					ret(stateSymbol.first, stateSymbol.second, symbol, n, d);
+					DeterministicStateType to = ret ( state, pdaSymbol, input, n );
+					addRetTransition ( state, input, pdaSymbol, std::move ( to ), d );
 				}
 			}
 		}
 
-		for(const auto& state : states) {
-			for(const InputSymbolType& symbol : n.getLocalInputAlphabet()) {
-				local(state, symbol, n, d);
+		for ( const DeterministicStateType & state : states ) {
+			for ( const InputSymbolType & input : n.getLocalInputAlphabet ( ) ) {
+				DeterministicStateType to = local(state, input, n );
+				addLocalTransition ( state, input, std::move ( to ), d );
 			}
-			for(const InputSymbolType& symbol : n.getCallInputAlphabet()) {
-				call(state, symbol, n, d);
+			for ( const InputSymbolType & input : n.getCallInputAlphabet ( ) ) {
+				DeterministicStateType to = call(state, input, n );
+				addCallTransition ( state, input, std::move ( to ), ext::make_pair ( state, input ), d );
 			}
 		}
 	}
diff --git a/alib2algo/src/automaton/determinize/common/RHDPDACommon.h b/alib2algo/src/automaton/determinize/common/RHDPDACommon.h
index cd71bd533c281c5e79c8a6b177e9c364ba34e2b7..b53774a22b4b9533cf244331b434daa238357414 100644
--- a/alib2algo/src/automaton/determinize/common/RHDPDACommon.h
+++ b/alib2algo/src/automaton/determinize/common/RHDPDACommon.h
@@ -109,51 +109,46 @@ ext::set < DeterministicStateType > localClosure ( const DeterministicStateType
 	return closed;
 }
 
-template<class T, class DeterministicStateType, class DeterministicPushdownStoreSymbolType, class R>
-ext::set<ext::pair<DeterministicStateType, DeterministicPushdownStoreSymbolType>> existsDirtyStateSymbol(const T& d, const ext::set < ext::pair < DeterministicStateType, DeterministicPushdownStoreSymbolType > > & rubbishReturnTransitions, const R& n) {
-	ext::set<ext::pair<DeterministicStateType, DeterministicPushdownStoreSymbolType>> dirtyStateSymbols;
+template < class T, class R >
+ext::set < ext::pair < typename T::StateType_t, typename T::PushdownStoreSymbolType_t > > existsDirtyStateSymbol ( const T & d, const R & n ) {
+	ext::set < ext::pair < typename T::StateType_t, typename T::PushdownStoreSymbolType_t > > dirtyStateSymbols;
 
-	for(const DeterministicStateType& state : d.getStates ( ) ) {
+	for ( const typename T::StateType_t & state : d.getStates ( ) ) {
 		bool originalPops = false;
-		auto dSubSet = retrieveDSubSet(state);
+		auto dSubSet = retrieveDSubSet ( state );
 
-		for(const auto& transition : n.getReturnTransitions()) {
-			if(dSubSet.count(std::get<0>(transition.first))) {
+		for ( const auto & transition : n.getReturnTransitions ( ) ) {
+			if ( dSubSet.count ( std::get < 0 > ( transition.first ) ) ) {
 				originalPops = true;
 				break;
 			}
 		}
-		if(!originalPops) continue;
-
-		ext::set < DeterministicStateType > lc = localClosure ( state, d );
+		if ( ! originalPops )
+			continue;
 
-		ext::set<DeterministicPushdownStoreSymbolType> topSymbols;
-		for(const DeterministicStateType& localState : lc) {
-			for(const auto& transition : d.getCallTransitions ( ) ) {
-				const auto& to = transition.second;
-				if(localState != to.first) continue;
+		ext::set < typename T::PushdownStoreSymbolType_t > topSymbols;
+		for ( const typename T::StateType_t & localState : localClosure ( state, d ) ) {
+			for ( const auto & transition : d.getCallTransitions ( ) ) {
+				const auto & to = transition.second;
+				if ( localState != to.first )
+					continue;
 
-				topSymbols.insert(to.second);
+				topSymbols.insert ( to.second );
 			}
 
-			if(d.getInitialState() == localState)
-				topSymbols.insert(d.getBottomOfTheStackSymbol());
+			if ( d.getInitialState ( ) == localState )
+				topSymbols.insert ( d.getBottomOfTheStackSymbol ( ) );
 		}
 
-		for(const auto& transition : d.getReturnTransitions ( ) ) {
-			if(state != std::get<0>(transition.first)) continue;
+		for ( const auto & transition : d.getReturnTransitions ( ) ) {
+			if ( state != std::get < 0 > ( transition.first ) )
+				continue;
 
 			topSymbols.erase(std::get<2>(transition.first));
 		}
 
-		for ( const auto & transition : rubbishReturnTransitions ) {
-			if(state != transition.first) continue;
-
-			topSymbols.erase(transition.second);
-		}
-
-		for(const DeterministicPushdownStoreSymbolType& topSymbol : topSymbols)
-			dirtyStateSymbols.insert(ext::make_pair(state, topSymbol));
+		for ( const typename T::PushdownStoreSymbolType_t & topSymbol : topSymbols )
+			dirtyStateSymbols.insert ( ext::make_pair ( state, topSymbol ) );
 	}
 
 	return dirtyStateSymbols;
diff --git a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h
index f31b863374ff223e41d5dda997ebb0017d4b1f04..915ddaf9181baaa326e7854a4bbed62a0550b956 100644
--- a/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h
+++ b/alib2data/src/automaton/PDA/RealTimeHeightDeterministicDPDA.h
@@ -51,6 +51,7 @@ protected:
 
 public:
 	using StateType_t = StateType;
+	using PushdownStoreSymbolType_t = PushdownStoreSymbolType;
 
 	explicit RealTimeHeightDeterministicDPDA ( ext::set < StateType > states, ext::set < InputSymbolType > inputAlphabet, ext::set < PushdownStoreSymbolType > pushdownStoreSymbol, StateType initialState, PushdownStoreSymbolType bottomOfTheStackSymbol, ext::set < StateType > finalStates );
 	explicit RealTimeHeightDeterministicDPDA ( StateType initialState, PushdownStoreSymbolType bottomOfTheStackSymbol );
diff --git a/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h b/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h
index 1a9bb228c945da8fc4fccf4ad37fbb0f93a5fe10..9d50f8a9eec8ad74d37c473e395758c6f91db936 100644
--- a/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h
+++ b/alib2data/src/automaton/PDA/VisiblyPushdownDPDA.h
@@ -52,6 +52,7 @@ protected:
 
 public:
 	using StateType_t = StateType;
+	using PushdownStoreSymbolType_t = PushdownStoreSymbolType;
 
 	explicit VisiblyPushdownDPDA ( ext::set < StateType > states, ext::set < InputSymbolType > callAlphabet, ext::set < InputSymbolType > returnAlphabet, ext::set < InputSymbolType > localAlphabet, ext::set < PushdownStoreSymbolType > pushdownStoreSymbol, StateType initialState, PushdownStoreSymbolType bottomOfTheStackSymbol, ext::set < StateType > finalStates );
 	explicit VisiblyPushdownDPDA ( StateType initialSymbol, PushdownStoreSymbolType bottomOfTheStackSymbol );