Solve stack state issue