fixed bug of javascript not loading