Fix to write_ip_locations.