fix embedded client, broke after refactor