fix for script so it gracefully exits if there's no ips that match the criteria.