Same here - no guarantee there's a second child. ^_^  Also, you want to either copy the entire contents, or else use textContent().  Heading text can have markup.