Minor fix

Switched from element.childNodes to element.children as suggested.