Fixed windowLoaded not setting on async script load