Fixed NodeList conversion to array