Fix AI and ad tests.