fixed AGI functions call