Fix wrong child indices.
Merge pull request #497 from tobeytailor/master

Fix wrong child indices.