Fix validation stack overflow