Fixed panic when there are empty segments, for example in the route “/admin//action”