Fix createMachine to connect the networks given in parameter