Improve get ip addr