Adding code to handle networks with zero locations