Fix possible error when overriding routes.