fixed a bug in finding the number of nodes