Added conversion of the nodelist to array and some fixes