Fix bug on only one ip addr.