fixed bug when only 1 IP is specified