fixed conversion of nodelist to array