Fixed ai not working