--- a/LIME-core/lib/gxf-parser.awk
+++ b/LIME-core/lib/gxf-parser.awk
@@ -1,19 +1,8 @@
 ##################################################################
-#This file is part of LIME.
-#
-#LIME is free software: you can redistribute it and/or modify
-#it under the terms of the GNU General Public License version 2
-#as published by the Free Software Foundation.
-#
-#LIME is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#
-#You should have received a copy of the GNU General Public License
-#along with LIME.  If not, see <http://www.gnu.org/licenses/>.
-##################################################################
-##################################################################
+# This AWK script implements GXF parsing
+#
+#Copyright 2008 Pjotr Kourzanov
+#
 #This file is part of LIME.
 #
 #LIME is free software: you can redistribute it and/or modify
@@ -170,7 +159,7 @@
 
     	edge_type[par,ed=++nedges[par]]=type[lev+1]
 	# TODO remove this later
-	edge_id[ed]=id[lev+1]
+	id_edge[edge_id[ed]=id[lev+1]]=ed
 
 	fn=from_node[lev+1]; fp=from_port[lev+1]
 	tn=to_node[lev+1]; tp=to_port[lev+1]
@@ -178,6 +167,8 @@
 	if (port_const[par,fn,fp] || !port_const[par,tn,tp])
 	    fail("mismatch in edge connector types " fn ":" fp "(" port_const[par,fn,fp] ")->("\
 		    port_const[par,tn,tp] ")" tn ":" tp "\nCHECK YOUR GRAPHS AND MODULES")
+
+	#print par,fn,fp,"->",tn,tp >STDERR
 
 	reg_peer(fn,fp,tn,tp,ed,"write",par)
 	reg_peer(tn,tp,fn,fp,ed,"read",par)