Start of AI fixes