revert ill-suited allocate_network changes.