correct the javascript loading issue