Fixed handling short forms of IPv6 addressess

  str_replace replaced all occurences of ::, therefore sometimes lengtening the array too long.