Patches and cleanup to IP management.