fixed traverseSwitch in CTCState so that it return