fix networkname in special cases
Merge pull request #1530 from matiu/fix/join

fix networkname in special cases