Fixed again publishEndpoint API