fix order to remove trailing slashes