Fix for browser-compatibility (javascript children property only worked in Chrome, while childNodes seems to work everywhere).