Improved async behavior of script loading.