fixing logic to wait for private IPs