diff --git a/alib2cli/src/parser/Parser.cpp b/alib2cli/src/parser/Parser.cpp
index e8da17a9d96a10e5d1265ebbecb0a35a89a080b9..d9de2ba5d9206a3de37e96f138b5e6bf73ba3a27 100644
--- a/alib2cli/src/parser/Parser.cpp
+++ b/alib2cli/src/parser/Parser.cpp
@@ -244,7 +244,7 @@ std::pair < bool, bool > Parser::introspect_cast_from_to ( ) {
 			from = true;
 		} else if ( check_nonreserved_kw ( "to" ) ) {
 			match_nonreserved_kw ( "to" );
-			from = true;
+			to = true;
 		} else {
 			throw exception::CommonException ( "Mismatched set while expanding param introspect_cast_from_to." );
 		}
diff --git a/alib2common/src/abstraction/CastRegistry.cpp b/alib2common/src/abstraction/CastRegistry.cpp
index cfb14340afbb026631ab3cc96d2745ae01cede29..fefc7e86e0521fb571d05d15b273d0cfb336a4ab 100644
--- a/alib2common/src/abstraction/CastRegistry.cpp
+++ b/alib2common/src/abstraction/CastRegistry.cpp
@@ -73,8 +73,8 @@ std::set < std::string > CastRegistry::listFrom ( const std::string & type ) {
 	std::set < std::string > res;
 
 	for ( const std::pair < const std::pair < std::string, std::string >, std::unique_ptr < Entry > > & entry : getEntries ( ) )
-		if ( sourceTypes.count ( entry.first.first ) )
-			res.insert ( entry.first.second );
+		if ( sourceTypes.count ( entry.first.second ) )
+			res.insert ( entry.first.first );
 
 	return res;
 }
@@ -90,8 +90,8 @@ std::set < std::string > CastRegistry::listTo ( const std::string & type ) {
 	std::set < std::string > res;
 
 	for ( const std::pair < const std::pair < std::string, std::string >, std::unique_ptr < Entry > > & entry : getEntries ( ) )
-		if ( targetTypes.count ( entry.first.second ) )
-			res.insert ( entry.first.first );
+		if ( targetTypes.count ( entry.first.first ) )
+			res.insert ( entry.first.second );
 
 	return res;
 }