Fixed stack overflow.