Fix getdescendents.
Merge pull request #1040 from mbebenita/master

Fix getdescendents.