bug: port assignment not deterministic