Fixed ie bug when looping through g elements. Using childNodes instead of children.