Fix stack overflow.