Add early exit condition