Fix bug of getLocalIp.