Fixing loading js libraries bug.