added check for additional headers. fixed check for duplicate ips