Fixed logic in available ips