fix script loading issue