Change endpoint function.Fix default endpoint.