Replaced "localhost" with ip address from InetAddress