Replaced getInetAddress with getLocalAddress