Fix NodeList to array conversion