Fixed bug in loading the global script element.