fix checking number of elements in IPv6