fix script loading