fix StackOverflowException.