Fix: early termination check bug.