Fixed the IP address fetching.