Fix children's null reference exception