fix client with endpoint