Fixed stack overflow when the input is too big.