fix bug with client -> client.apiCall