Cleanup network port handling