corrected idPrefix check logic in getRoutesByNames()