fixed the bug of loading resources in the html file