change order of js loading in index