Updated component.addChild to use getComponent instead of accessing the components object directly