Fix to saving ip addresses