Bug fix: wait until all scripts are loaded
tab to spaces