fixed logic in loop so it either fills up nodes_requested structs, or stops when nothing left