Agent/client fixes