Fixing bad parameters on getChildren recursion