Fixed script loading errors