Remove un-needed segment in the route.