fix the trailing slash issue.