fix references to endpoint