Added missing while(true) loop in NetworkLoop