modify root templates dir and fix erros when load in home page.