Handle trailing slash