Fixed serializing of IP addresses