fixed issue where global template scripts were not loaded