[BUGFIX] Correct trim of trailing slash