fix a bunch of broken things with AI