I’d recommend going through the debugger step-by-step and checking those conditions which are failing to trigger the terminate action