Fixed java:nodes() bug -- thanks to Gabor Hosszu for identifying the error.