fix typo
fix infinite loop (cfg cycle) in case termination computation; add test cases to check this corner cases