fixed xi fn call correctness