Should fix AI crash