Fixed async script loading issues