fixed the while loops of the network files. These will be the latest stable revisions