fix pathname related issue.