delaying autostart until all scripts are loaded