child can be null if selectNode fails