properly handle port removal in route.