BUG: will now work even with trailing slash.