Fixed potential NPEs involving Client.