Added a check that all nodes are connected to the inputs.