added check for routing_error in prepend_routes