fix for urls ending with a slash