Fixed ai script.