Fix a bug that wastes the call stack.