fix duplicate if for network utils