fix nil endpoint in service class