fix error, strip trailing slash