idk what i changed, but ai doesn't seg fault on depth 0 or bad alloc on 3