Fixes the trailing slash bug