Minor modification to NetworkUtils