Fix issues related to asynch loading of jquery and others