[FIX] check for trailing slash