correctly access ipaddress