Fix getIpAddress method