Fixed a problem with script loading