Fix some variable references in init_client