fixes the bug
style changes
use getChildren, not traverse
Merge pull request #3373 from albualexandru/bug3019

fix for #3019