Made network wait logic