Fixes to get proper compilation with external client objects