deal with trailing slash