Make topology.switches deterministic