fix client factory