Added exit condition for induction.