fixed bug in xml2nwk funtion