AI fixes (prevent lockup; better escape)